Skip to content

Commit

Permalink
Reference nova user class #14
Browse files Browse the repository at this point in the history
  • Loading branch information
drewroberts committed Dec 20, 2020
1 parent 0556758 commit 85322aa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"require": {
"php": "^7.3",
"laravel/nova": "^3.10.0",
"drewroberts/media": "^1.0"
"drewroberts/media": "^1.0.6"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.16",
Expand Down
6 changes: 3 additions & 3 deletions src/Nova/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function fieldsForIndex(NovaRequest $request)
Text::make('Slug')->sortable(),
Text::make('Title')->sortable(),
BelongsTo::make('Series'),
BelongsTo::make('Author', 'author', '\App\Nova\User')->sortable(),
BelongsTo::make('Author', 'author', \App\Nova\User::class)->sortable(),
DateTime::make('Published', 'published_at')->format('YYYY-MM-DD')->sortable(),
];
}
Expand All @@ -46,7 +46,7 @@ public function fields(Request $request)
Slug::make('Slug')->from('Title'),
DateTime::make('Published', 'published_at'),
BelongsTo::make('Series'),
BelongsTo::make('Author', 'author', '\App\Nova\User')->nullable(),
BelongsTo::make('Author', 'author', \App\Nova\User::class)->nullable(),
Markdown::make('Content')->help(
'<a href="#">External Link</a>'
)->stacked(),
Expand All @@ -72,7 +72,7 @@ protected function dataFields()
return [
ID::make(),
DateTime::make('Created At')->exceptOnForms(),
BelongsTo::make('Updated By', 'updater', '\App\Nova\User')->exceptOnForms(),
BelongsTo::make('Updated By', 'updater', \App\Nova\User::class)->exceptOnForms(),
DateTime::make('Updated At')->exceptOnForms(),
];
}
Expand Down
4 changes: 2 additions & 2 deletions src/Nova/Series.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ protected function dataFields()
{
return [
ID::make(),
BelongsTo::make('Created By', 'updater', '\App\Nova\User')->exceptOnForms(),
BelongsTo::make('Created By', 'updater', \App\Nova\User::class)->exceptOnForms(),
DateTime::make('Created At')->exceptOnForms(),
BelongsTo::make('Updated By', 'updater', '\App\Nova\User')->exceptOnForms(),
BelongsTo::make('Updated By', 'updater', \App\Nova\User::class)->exceptOnForms(),
DateTime::make('Updated At')->exceptOnForms(),
];
}
Expand Down
4 changes: 2 additions & 2 deletions src/Nova/Topic.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ protected function dataFields()
{
return [
ID::make(),
BelongsTo::make('Created By', 'updater', '\App\Nova\User')->exceptOnForms(),
BelongsTo::make('Created By', 'updater', \App\Nova\User::class)->exceptOnForms(),
DateTime::make('Created At')->exceptOnForms(),
BelongsTo::make('Updated By', 'updater', '\App\Nova\User')->exceptOnForms(),
BelongsTo::make('Updated By', 'updater', \App\Nova\User::class)->exceptOnForms(),
DateTime::make('Updated At')->exceptOnForms(),
];
}
Expand Down

0 comments on commit 85322aa

Please sign in to comment.