Laravel_App/app/Widgets/IconBtnCreateWidget.php

35 lines
870 B
PHP
Raw Normal View History

2025-01-20 16:57:48 +03:00
<?php
namespace App\Widgets;
use Arrilot\Widgets\AbstractWidget;
2025-01-22 13:13:49 +03:00
use itguild\forms\debug\Debug;
2025-01-20 16:57:48 +03:00
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.
*/
2025-01-22 13:13:49 +03:00
public function run(): \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Foundation\Application
2025-01-20 16:57:48 +03:00
{
$url = $this->config['url'];
2025-01-22 13:13:49 +03:00
return (new ActionButtonWidget([
// 'label' => "class='fa-regular fa-square-plus'",
'label' => "fa-regular fa-square-plus",
// 'label' => "Создать",
2025-01-20 16:57:48 +03:00
'url' => $url,
'btn_type' => "success",
'title' => "Создать"
2025-01-22 13:13:49 +03:00
]))->run();
2025-01-20 16:57:48 +03:00
}
}