From f7f3f4348f46b2b25fbf78a8abd2b224034c45a7 Mon Sep 17 00:00:00 2001 From: Bole Chen Date: Thu, 9 Jan 2020 19:08:17 +0800 Subject: [PATCH] Change Causer to MorphTo. --- src/Resources/Activitylog.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Resources/Activitylog.php b/src/Resources/Activitylog.php index 540343b..848a9f4 100644 --- a/src/Resources/Activitylog.php +++ b/src/Resources/Activitylog.php @@ -15,6 +15,7 @@ use Laravel\Nova\Fields\Code; use Laravel\Nova\Fields\DateTime; use Laravel\Nova\Fields\ID; +use Laravel\Nova\Fields\MorphTo; use Laravel\Nova\Fields\Text; use Laravel\Nova\Resource as NovaResource; @@ -84,11 +85,11 @@ public function fields(Request $request) Text::make('Description'), Text::make('Subject Id'), Text::make('Subject Type'), - Text::make('Causer Id'), + MorphTo::make('Causer'), Text::make('Causer Ip', 'properties->ip')->onlyOnIndex(), - Code::make('properties')->json(JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE), - DateTime::make('created_at'), + Code::make('Properties')->json(JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE), + DateTime::make('Created At'), ]; }