54 lines
1.1 KiB
PHP
54 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Instance;
|
|
use Illuminate\Http\Request;
|
|
use App\Models\Tag;
|
|
use App\Helpers\StringHelper;
|
|
|
|
class InstanceController extends TagController
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this->middleware(['auth' => 'instancePermissions'])->except('index', 'show');
|
|
|
|
// Model
|
|
$this->modelType = StringHelper::toURL(__('models.instance'));
|
|
$this->modelData = [
|
|
'name' => [
|
|
'label' => __('models.name'),
|
|
'type' => 'inputText',
|
|
'placeholder' => __('models.instance'),
|
|
'validation' => [
|
|
'rules' => 'required|min:3',
|
|
]
|
|
],
|
|
'order' => [
|
|
'type' => 'inputHidden',
|
|
]
|
|
];
|
|
|
|
// URL Options
|
|
$this->url = 'instance';
|
|
$this->route = StringHelper::toURL(__('models.instance'));
|
|
$this->adminIndexOptions = [
|
|
'orderBy' => 'order',
|
|
'orderDirection' => 'ASC',
|
|
'paginate' => 10,
|
|
'listdata' => [
|
|
'name' => [
|
|
],
|
|
'order' => [
|
|
'label' => __('admin.priority')
|
|
],
|
|
'updated' => [
|
|
'label' => __('admin.last modified')
|
|
]
|
|
]
|
|
];
|
|
|
|
parent::__construct();
|
|
}
|
|
}
|