tags
This commit is contained in:
@ -98,4 +98,9 @@ class TagController extends AdminController
|
||||
$this->redirect("/admin/tag/");
|
||||
}
|
||||
|
||||
public function actionSettings(): void
|
||||
{
|
||||
echo "tag settings";
|
||||
}
|
||||
|
||||
}
|
@ -11,8 +11,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property int $entity_id
|
||||
* @property string $slug
|
||||
* @property int $status
|
||||
* @method static where(int[] $array)
|
||||
* @method static find($id)
|
||||
*/
|
||||
class Tag extends Model
|
||||
{
|
||||
@ -21,13 +19,14 @@ class Tag extends Model
|
||||
|
||||
protected $table = 'tag';
|
||||
|
||||
protected $fillable = ['label', 'entity', 'slug', 'status'];
|
||||
protected $fillable = ['label', 'entity', 'entity_id', 'slug', 'status'];
|
||||
|
||||
public static function labels(): array
|
||||
{
|
||||
return [
|
||||
'label' => 'Заголовок',
|
||||
'entity' => 'Сущность',
|
||||
'entity_id' => 'Идентификатор сущность',
|
||||
'slug' => 'Slug',
|
||||
'status' => 'Статус',
|
||||
];
|
||||
|
@ -15,4 +15,7 @@ App::$collector->group(["prefix" => "admin"], function (CgRouteCollector $router
|
||||
App::$collector->any("/edit/{id}", [\app\modules\tag\controllers\TagController::class, 'actionEdit']);
|
||||
App::$collector->get('/delete/{id}', [\app\modules\tag\controllers\TagController::class, 'actionDelete']);
|
||||
});
|
||||
App::$collector->group(["prefix" => "settings"], function (CGRouteCollector $router){
|
||||
App::$collector->get('/tag', [\app\modules\tag\controllers\TagController::class, 'actionSettings']);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user