File: /home/eslinced-103/brise-edu.or.kr/app/Nova/Central/Domain.php
<?php
namespace App\Nova\Central;
use App\Nova\Resource;
use Laravel\Nova\Fields\BelongsTo;
use Laravel\Nova\Fields\Boolean;
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;
class Domain extends Resource
{
/**
* The model the resource corresponds to.
*
* @var string
*/
public static $model = \App\Models\Central\Domain::class;
/**
* The single value that should be used to represent the resource when being displayed.
*
* @var string
*/
public static $title = 'domain';
/**
* The columns that should be searched.
*
* @var array
*/
public static $search = [
'id', 'domain',
];
/**
* Get the logical group associated with the resource.
*
* @return string
*/
public static function group(): string
{
return __('Multi-Site');
}
public static function label(): string
{
return __('Manage Domains');
}
/**
* Get the fields displayed by the resource.
*/
public function fields(NovaRequest $request): array
{
return [
ID::make()->sortable(),
Text::make('Domain')->rules('required'),
Boolean::make('Primary', 'is_primary')->rules('required'),
Boolean::make('Fallback', 'is_fallback')->rules('required'),
BelongsTo::make('Tenant'),
];
}
/**
* Get the cards available for the request.
*/
public function cards(NovaRequest $request): array
{
return [];
}
/**
* Get the filters available for the resource.
*/
public function filters(NovaRequest $request): array
{
return [];
}
/**
* Get the lenses available for the resource.
*/
public function lenses(NovaRequest $request): array
{
return [];
}
/**
* Get the actions available for the resource.
*/
public function actions(NovaRequest $request): array
{
return [];
}
}