36 lines
905 B
PHP
36 lines
905 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
use App\Models\Card;
|
|
use App\Http\Livewire\Form\CardForm;
|
|
|
|
class CardController extends BaseController
|
|
{
|
|
protected $_datatable = [
|
|
'model' => Card::class,
|
|
'default_sort' => 'id',
|
|
'route_create' => 'admin.card.create',
|
|
'route_edit' => 'admin.card.edit',
|
|
'delete_enabled' => true,
|
|
'restore_enabled' => true,
|
|
'columns' => [
|
|
'id' => '#',
|
|
'body' => 'Body',
|
|
'subject' => 'Subject',
|
|
'subject_type' => 'Subject Type',
|
|
'raid.name' => 'Raid',
|
|
],
|
|
'sort_columns' => [
|
|
'id' => 'id',
|
|
'body' => 'body',
|
|
'subject' => ['character.name', 'class', 'role'],
|
|
'raid.name' => 'raid.name',
|
|
]
|
|
];
|
|
|
|
static public function getForm(): string
|
|
{
|
|
return CardForm::class;
|
|
}
|
|
}
|