Answer the question
In order to leave comments, you need to log in
When using the hideWhenCreating (and/or hideWhenUpdating) method in the fields method, how can I make the return set type an array?
There is a resource app\Nova\Resources\Client.php
This is how the fields method of this resource looks like:
public function fields(Request $request)
{
return [
UUID::make('id')->hideWhenCreating()->hideWhenUpdating(),
Text::make('SomeName', 'name'),
BelongsTo::make( 'Users', "user", User::class)
];
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question