brta archive module
This commit is contained in:
@ -19,5 +19,11 @@ $table->beforePrint(function () use ($option) {
|
||||
$btn .= DangerBtn::create("Удалить", "/admin/option/delete/" . $option->id)->fetch();
|
||||
return $btn;
|
||||
});
|
||||
|
||||
$table->rows([
|
||||
'status' => (function ($data) {
|
||||
return \kernel\modules\option\models\Option::getStatus()[$data];
|
||||
})
|
||||
]);
|
||||
$table->create();
|
||||
$table->render();
|
@ -15,7 +15,6 @@ class PostService
|
||||
$model->content = $form_model->getItem('content');
|
||||
$model->user_id = $form_model->getItem('user_id');
|
||||
$model->title = $form_model->getItem('title');
|
||||
// $model->slug = Slug::recursiveCreateSlug(Post::class, $this->createSlug($form_model));
|
||||
$model->slug = Slug::createSlug($form_model->getItem('title'), Post::class);
|
||||
if ($model->save()){
|
||||
return $model;
|
||||
|
Reference in New Issue
Block a user