- Anmeldeformular für Kinderfeuerwehr fertiggestellt - Fehlerbehebung wegen Umstellung auf https - Navigationsleiste wird in der Kategorie "Wir über uns" dynamisch erstellt
78 lines
1.7 KiB
PHP
Executable File
78 lines
1.7 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use App\Models\Department;
|
|
use App\Models\Instance;
|
|
use App\Models\Tag;
|
|
use App\Helpers\StringHelper;
|
|
|
|
class PageCategoryController extends TagController
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this->middleware(['auth' => 'pageCategoryPermissions'])->except('index', 'show');
|
|
|
|
$this->modelHasPublications = false;
|
|
// Model
|
|
$this->modelType = StringHelper::toURL(__('models.pagecategory'));
|
|
$this->modelData = [
|
|
'parent' => [
|
|
'type' => 'inputSelect',
|
|
'name' => 'tags',
|
|
'label' => __('models.parent category'),
|
|
'foreign' => [
|
|
'class' => Tag::class,
|
|
'model' => 'tags',
|
|
'column' => 'name',
|
|
'order' => [
|
|
'column' => 'order',
|
|
'direction' => 'ASC'
|
|
],
|
|
'conditions' => [
|
|
[
|
|
'column' => 'type',
|
|
'value' => 'seitenkategorie',
|
|
],
|
|
],
|
|
'linkedList' => [
|
|
]
|
|
]
|
|
],
|
|
'name' => [
|
|
'label' => __('models.name'),
|
|
'type' => 'inputText',
|
|
'placeholder' => __('models.category'),
|
|
'validation' => [
|
|
'rules' => 'required|min:3',
|
|
]
|
|
],
|
|
'order' => [
|
|
'type' => 'inputHidden',
|
|
]
|
|
];
|
|
|
|
// URL options
|
|
$this->url = 'pagecategory';
|
|
$this->route = StringHelper::toURL(__('models.pagecategory'));
|
|
$this->adminIndexOptions = [
|
|
'orderBy' => 'order',
|
|
'orderDirection' => 'ASC',
|
|
'paginate' => 10,
|
|
'listdata' => [
|
|
'name' => [],
|
|
'order' => [
|
|
'label' => __('admin.priority')
|
|
],
|
|
'updated' => [
|
|
'label' => __('admin.last modified')
|
|
]
|
|
]
|
|
];
|
|
|
|
parent::__construct();
|
|
}
|
|
}
|