card orders WIP

This commit is contained in:
2023-12-11 17:37:57 +05:00
parent 1dc7441631
commit 2eba88c7b1
3 changed files with 23 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ use Illuminate\Http\Request;
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 @@ class CardType extends Resource
->rules('nullable', 'numeric'),
Text::make(__('Notes'), 'notes')
->rules('required', 'string', 'max:255'),
->rules('nullable', 'string', 'max:255'),
NovaSwitcher::make(__('Active'), 'active')
->default(true),