36 lines
873 B
PHP
36 lines
873 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Widgets;
|
||
|
|
||
|
use Arrilot\Widgets\AbstractWidget;
|
||
|
use itguild\forms\debug\Debug;
|
||
|
|
||
|
class ActionButtonWidget 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(): \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Foundation\Application
|
||
|
{
|
||
|
$label = $this->config['label'];
|
||
|
$btn_type = $this->config['btn_type'];
|
||
|
$url = $this->config['url'];
|
||
|
$title = $this->config['title'] ?? '';
|
||
|
|
||
|
return view('widgets.action_button_widget', [
|
||
|
'label' => $label,
|
||
|
'btn_type' => $btn_type,
|
||
|
'url' => $url,
|
||
|
'title' => $title
|
||
|
]);
|
||
|
}
|
||
|
}
|