Laravel_App/app/Widgets/IconBtnDeleteWidget.php

25 lines
629 B
PHP

<?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();
}
}