action btns icon widgets add
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
namespace App\Widgets;
|
||||
|
||||
use Arrilot\Widgets\AbstractWidget;
|
||||
use itguild\forms\debug\Debug;
|
||||
|
||||
class IconBtnCreateWidget extends AbstractWidget
|
||||
{
|
||||
@ -17,17 +18,17 @@ class IconBtnCreateWidget extends AbstractWidget
|
||||
* Treat this method as a controller action.
|
||||
* Return view() or other content to display.
|
||||
*/
|
||||
public function run(): void
|
||||
public function run(): \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Foundation\Application
|
||||
{
|
||||
$url = $this->config['url'];
|
||||
|
||||
$btn = new ActionButtonWidget([
|
||||
// 'label' => "<i class='fa-regular fa-square-plus'></i>",
|
||||
'label' => "Создать",
|
||||
return (new ActionButtonWidget([
|
||||
// 'label' => "class='fa-regular fa-square-plus'",
|
||||
'label' => "fa-regular fa-square-plus",
|
||||
// 'label' => "Создать",
|
||||
'url' => $url,
|
||||
'btn_type' => "success",
|
||||
'title' => "Создать"
|
||||
]);
|
||||
$btn->run();
|
||||
]))->run();
|
||||
}
|
||||
}
|
||||
|
24
app/Widgets/IconBtnDeleteWidget.php
Normal file
24
app/Widgets/IconBtnDeleteWidget.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Widgets;
|
||||
|
||||
use Arrilot\Widgets\AbstractWidget;
|
||||
|
||||
class IconBtnDeleteWidget extends AbstractWidget
|
||||
{
|
||||
/**
|
||||
* Treat this method as a controller action.
|
||||
* Return view() or other content to display.
|
||||
*/
|
||||
public function run(): \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Foundation\Application
|
||||
{
|
||||
$url = $this->config['url'];
|
||||
|
||||
return (new ActionButtonWidget([
|
||||
'label' => "fa-regular fa-trash-can",
|
||||
'url' => $url,
|
||||
'btn_type' => "danger",
|
||||
'title' => "Удалить"
|
||||
]))->run();
|
||||
}
|
||||
}
|
25
app/Widgets/IconBtnEditWidget.php
Normal file
25
app/Widgets/IconBtnEditWidget.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Widgets;
|
||||
|
||||
use Arrilot\Widgets\AbstractWidget;
|
||||
|
||||
class IconBtnEditWidget extends AbstractWidget
|
||||
{
|
||||
/**
|
||||
* Treat this method as a controller action.
|
||||
* Return view() or other content to display.
|
||||
*/
|
||||
public function run(): \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Foundation\Application
|
||||
{
|
||||
$url = $this->config['url'];
|
||||
|
||||
|
||||
return (new ActionButtonWidget([
|
||||
'label' => "fa-solid fa-pen",
|
||||
'url' => $url,
|
||||
'btn_type' => "success",
|
||||
'title' => "Редактировать"
|
||||
]))->run();
|
||||
}
|
||||
}
|
24
app/Widgets/IconBtnListWidget.php
Normal file
24
app/Widgets/IconBtnListWidget.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Widgets;
|
||||
|
||||
use Arrilot\Widgets\AbstractWidget;
|
||||
|
||||
class IconBtnListWidget extends AbstractWidget
|
||||
{
|
||||
/**
|
||||
* Treat this method as a controller action.
|
||||
* Return view() or other content to display.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$url = $this->config['url'];
|
||||
|
||||
return (new ActionButtonWidget([
|
||||
'label' => "fa-regular fa-rectangle-list",
|
||||
'url' => $url,
|
||||
'btn_type' => "primary",
|
||||
'title' => "Список"
|
||||
]))->run();
|
||||
}
|
||||
}
|
24
app/Widgets/IconBtnViewWidget.php
Normal file
24
app/Widgets/IconBtnViewWidget.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Widgets;
|
||||
|
||||
use Arrilot\Widgets\AbstractWidget;
|
||||
|
||||
class IconBtnViewWidget extends AbstractWidget
|
||||
{
|
||||
/**
|
||||
* Treat this method as a controller action.
|
||||
* Return view() or other content to display.
|
||||
*/
|
||||
public function run(): \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Foundation\Application
|
||||
{
|
||||
$url = $this->config['url'];
|
||||
|
||||
return (new ActionButtonWidget([
|
||||
'btn_type' => "primary",
|
||||
'label' => "fa-regular fa-eye",
|
||||
'url' => $url,
|
||||
'title' => "Просмотреть"
|
||||
]))->run();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user