*/ public static $model = AppVersionModel::class; /** * The single value that should be used to represent the resource when being displayed. * * @var string */ public static $title = 'version'; /** * The columns that should be searched. * * @var array */ public static $search = [ 'version', ]; /** * Get the displayable label of the resource. */ public static function label(): string { return __('App Versions'); } /** * Get the displayable singular label of the resource. */ public static function singularLabel(): string { return __('App Version'); } /** * Get the fields displayed by the resource. */ public function fields(NovaRequest $request): array { return [ ID::make()->sortable(), Text::make(__('Version'), 'version') ->rules('required', 'string', 'max:255') ->sortable(), Select::make(__('Operating System'), 'os') ->displayUsingLabels() ->searchable() ->options(OS::types()) ->rules('required', 'string', 'max:255') ->sortable(), Boolean::make(__('Important'), 'important') ->default(false) ->rules('required') ->sortable(), Text::make(__('Notes'), 'notes'), ]; } /** * Get the cards available for the request. * * @return array */ public function cards(NovaRequest $request) { return []; } /** * Get the filters available for the resource. * * @return array */ public function filters(NovaRequest $request) { return []; } /** * Get the lenses available for the resource. * * @return array */ public function lenses(NovaRequest $request) { return []; } /** * Get the actions available for the resource. * * @return array */ public function actions(NovaRequest $request) { return []; } }