Laravel_App/app/Widgets/IconBtnCreateWidget.php

34 lines
708 B
PHP

<?php
namespace App\Widgets;
use Arrilot\Widgets\AbstractWidget;
class IconBtnCreateWidget extends AbstractWidget
{
/**
* The configuration array.
*
* @var array
*/
protected $config = [];
/**
* Treat this method as a controller action.
* Return view() or other content to display.
*/
public function run(): void
{
$url = $this->config['url'];
$btn = new ActionButtonWidget([
// 'label' => "<i class='fa-regular fa-square-plus'></i>",
'label' => "Создать",
'url' => $url,
'btn_type' => "success",
'title' => "Создать"
]);
$btn->run();
}
}