From e0f9fd5f6c5b9a0d6ff8689839b0ec33b31c7366 Mon Sep 17 00:00:00 2001 From: Tuvshu Date: Mon, 6 May 2024 14:54:34 -0600 Subject: [PATCH] Feature - Add attributes to the Staff model (#1473) 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 --- packages/admin/src/Models/Staff.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/admin/src/Models/Staff.php b/packages/admin/src/Models/Staff.php index 4cfc9546e8..6f0826c461 100644 --- a/packages/admin/src/Models/Staff.php +++ b/packages/admin/src/Models/Staff.php @@ -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. */