widgets, fontawesome add
This commit is contained in:
35
app/Widgets/ActionButtonWidget.php
Normal file
35
app/Widgets/ActionButtonWidget.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?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
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user