*/ public static $model = \App\Modules\VisaMasterSettings\Models\VisaMasterSettings::class; /** * The single value that should be used to represent the resource when being displayed. * * @var string */ public static $title = 'display_name'; /** * The columns that should be searched. * * @var array */ public static $search = [ 'name', 'value', ]; /** * Get the displayable label of the resource. */ public static function label(): string { return __('Visa/Master, Sber Settings'); } /** * Get the fields displayed by the resource. * * @param \Laravel\Nova\Http\Requests\NovaRequest $request * @return array */ public function fields(NovaRequest $request): array { return [ ID::make('id')->sortable(), Text::make(__('Code'), 'name') ->rules('required', 'string', 'max:255') ->readonly(! auth()->user()->isMe()), Text::make(__('Name'), 'display_name') ->rules('required', 'string', 'max:255') ->readonly(! auth()->user()->isMe()), Text::make(__('Yazgy'), 'value') ->rules('required', 'string', 'max:255'), ]; } }