#
Button
in this section, we explain how to use Button
class to create a button in panel.
#
Use Button
Class From:
use T0team\LaravelPanel\Controllers\Button;
#
Start Using Button
Class
$button = Button::make();
Button Actions
If you don't use any button action, button will not work. (see
#
Button Methods
#
Set Label
$button->label('button label');
#
Set Icon
Icon name is from Font Awesome icons.
$button->icon('icon name');
#
Set Color
You must use Color
enum to set button color.
use T0team\LaravelPanel\Enums\Color;
$button->color(Color::PRIMARY);
#
Set Size
You must use Size
enum to set button size.
use T0team\LaravelPanel\Enums\Size;
$button->size(Size::SMALL);
#
Set Outline
$button->outLine();
#
Set Open In New Tab
$button->openInNewTab();
#
Set Disabled
$button->disabled();
$button->hidden();
#
Set Rel
$button->rel('rel value');
#
Set Custom Target
$button->target('target value');
#
Button Actions
#
Open Url
$button->url('url');
#
Open Route
$button->route('route name', ['route needed parameters']);
#
Open Modal
$button->modal(Modal::make()->...);
See Modal guide to know how to use Modal
class.