card orders WIP
This commit is contained in:
1 parent
1dc7441631
commit
2eba88c7b1
3 files changed
+23
-2
No files matched your search
@@ -8,6 +8,7 @@
|
||||
use Laravel\Nova\Fields\ID;
|
||||
use Laravel\Nova\Fields\Text;
|
||||
use Laravel\Nova\Http\Requests\NovaRequest;
|
||||
use Trin4ik\NovaSwitcher\NovaSwitcher;
|
||||
|
||||
class CardType extends Resource
|
||||
{
|
||||
@@ -34,6 +35,22 @@ class CardType extends Resource
|
||||
'name',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the displayable label of the resource.
|
||||
*/
|
||||
public static function label(): string
|
||||
{
|
||||
return __('Card types');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the displayable singular label of the resource.
|
||||
*/
|
||||
public static function singularLabel(): string
|
||||
{
|
||||
return __('Card type');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*/
|
||||
@@ -50,7 +67,7 @@ public function fields(NovaRequest $request): array
|
||||
->rules('nullable', 'numeric'),
|
||||
|
||||
Text::make(__('Notes'), 'notes')
|
||||
->rules('required', 'string', 'max:255'),
|
||||
->rules('nullable', 'string', 'max:255'),
|
||||
|
||||
NovaSwitcher::make(__('Active'), 'active')
|
||||
->default(true),
|
||||
|
||||
Reference in new issue
Block a user