crud menu
This commit is contained in:
17
app/tables/columns/menu/MenuDeleteActionColumn.php
Normal file
17
app/tables/columns/menu/MenuDeleteActionColumn.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace app\tables\columns\menu;
|
||||
|
||||
use Itguild\Tables\ActionColumn\ActionColumn;
|
||||
|
||||
class MenuDeleteActionColumn extends ActionColumn
|
||||
{
|
||||
|
||||
protected string $prefix = "/delete/";
|
||||
|
||||
public function fetch(): string
|
||||
{
|
||||
$link = $this->baseUrl . $this->prefix . $this->id;
|
||||
return " <a href='$link' class='btn btn-danger'>Удалить</a> ";
|
||||
}
|
||||
}
|
17
app/tables/columns/menu/MenuEditActionColumn.php
Normal file
17
app/tables/columns/menu/MenuEditActionColumn.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace app\tables\columns\menu;
|
||||
|
||||
use Itguild\Tables\ActionColumn\ActionColumn;
|
||||
|
||||
class MenuEditActionColumn extends ActionColumn
|
||||
{
|
||||
|
||||
protected string $prefix = "/update/";
|
||||
|
||||
public function fetch(): string
|
||||
{
|
||||
$link = $this->baseUrl . $this->prefix . $this->id;
|
||||
return " <a href='$link' class='btn btn-success'>Редактировать</a> ";
|
||||
}
|
||||
}
|
17
app/tables/columns/menu/MenuViewActionColumn.php
Normal file
17
app/tables/columns/menu/MenuViewActionColumn.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace app\tables\columns\menu;
|
||||
|
||||
use Itguild\Tables\ActionColumn\ActionColumn;
|
||||
|
||||
class MenuViewActionColumn extends ActionColumn
|
||||
{
|
||||
|
||||
protected string $prefix = "/";
|
||||
|
||||
public function fetch(): string
|
||||
{
|
||||
$link = $this->baseUrl . $this->prefix . $this->id;
|
||||
return " <a href='$link' class='btn btn-primary'>Просмотр</a> ";
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\tables\columns;
|
||||
namespace app\tables\columns\post;
|
||||
|
||||
use Itguild\Tables\ActionColumn\ActionColumn;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\tables\columns;
|
||||
namespace app\tables\columns\post;
|
||||
|
||||
use Itguild\Tables\ActionColumn\ActionColumn;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\tables\columns;
|
||||
namespace app\tables\columns\post;
|
||||
|
||||
use Itguild\Tables\ActionColumn\ActionColumn;
|
||||
|
@ -1,8 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace app\tables\columns;
|
||||
namespace app\tables\columns\user;
|
||||
|
||||
use app\helpers\Debug;
|
||||
use Itguild\Tables\ActionColumn\ActionColumn;
|
||||
|
||||
class UserDeleteActionColumn extends ActionColumn
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\tables\columns;
|
||||
namespace app\tables\columns\user;
|
||||
|
||||
use Itguild\Tables\ActionColumn\ActionColumn;
|
||||
|
||||
@ -10,7 +10,6 @@ class UserEditActionColumn extends ActionColumn
|
||||
|
||||
public function fetch(): string
|
||||
{
|
||||
// $link = $this->baseUrl . $this->prefix . $this->id . $this->prefix . "update";
|
||||
$link = $this->baseUrl . $this->prefix . $this->id;
|
||||
return " <a href='$link' class='btn btn-success'>Редактировать</a> ";
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\tables\columns;
|
||||
namespace app\tables\columns\user;
|
||||
|
||||
use Itguild\Tables\ActionColumn\ActionColumn;
|
||||
|
Reference in New Issue
Block a user