Skip to content

Commit

Permalink
Change Causer to MorphTo.
Browse files Browse the repository at this point in the history
  • Loading branch information
bolechen committed Jan 9, 2020
1 parent e3547ad commit f7f3f43
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Resources/Activitylog.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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'),
];
}

Expand Down

0 comments on commit f7f3f43

Please sign in to comment.