Last active
July 4, 2020 17:12
-
-
Save vineeth030/486ee8862e954aaeadb96d15ca99ce08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Laravel\Nova\Fields\ID; | |
use Laravel\Nova\Fields\Text; | |
/** | |
* Get the fields displayed by the resource. | |
* | |
* @param \Illuminate\Http\Request $request | |
* @return array | |
*/ | |
public function fields(Request $request) | |
{ | |
return [ | |
ID::make()->sortable(), | |
Text::make('Title')->sortable(), | |
Textarea::make('Description'), | |
Date::make('Created At'), | |
Boolean::make('Active'), | |
Select::make('Topic')->options([ | |
'S' => 'Shopping', | |
'M' => 'Money', | |
'L' => 'Lifestyle', | |
])->displayUsingLabels(), | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment