Skip to content

Commit

Permalink
Feature - Add attributes to the Staff model (#1473)
Browse files Browse the repository at this point in the history
This pr is that The `fullName` and `gravatar` attributes can be computed
easily on the frontend or via an Auth helper.

Co-authored-by: Alec Ritson <[email protected]>
  • Loading branch information
tuvshinjargal and alecritson authored May 6, 2024
1 parent ff9db22 commit e0f9fd5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/admin/src/Models/Staff.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ protected static function newFactory(): StaffFactory
'email_verified_at' => 'datetime',
];

/**
* Append attributes to the model.
*
* @var array
*/
protected $appends = ['fullName', 'gravatar'];

/**
* Create a new instance of the Model.
*/
Expand Down

0 comments on commit e0f9fd5

Please sign in to comment.