Компонент ActionGroup создан для быстрой группировки набора ActionButton, а также наполнения кнопок данными.
ActionGroup::make(iterable $actions = [])
ActionGroup::make(iterable $actions = [])
ActionGroup::make(iterable $actions = [])
ActionGroup::make(iterable $actions = [])
ActionGroup::make(iterable $actions = [])
$actions - набор ActionButton.
use MoonShine\UI\Components\ActionButton;
use MoonShine\UI\Components\ActionGroup;
ActionGroup::make([
ActionButton::make('Button 1'),
ActionButton::make('Button 2'),
])
namespaces
use MoonShine\UI\Components\ActionButton;
use MoonShine\UI\Components\ActionGroup;
ActionGroup::make([
ActionButton::make('Button 1'),
ActionButton::make('Button 2'),
])
use MoonShine\UI\Components\ActionButton;
use MoonShine\UI\Components\ActionGroup;
ActionGroup::make([
ActionButton::make('Button 1'),
ActionButton::make('Button 2'),
])
namespaces
use MoonShine\UI\Components\ActionButton;
use MoonShine\UI\Components\ActionGroup;
ActionGroup::make([
ActionButton::make('Button 1'),
ActionButton::make('Button 2'),
])
use MoonShine\UI\Components\ActionButton;
use MoonShine\UI\Components\ActionGroup;
ActionGroup::make([
ActionButton::make('Button 1'),
ActionButton::make('Button 2'),
])
Чтобы наполнить все кнопки данными, воспользуйтесь методом fill() и передайте DataWrapperContract.
ActionGroup::make($buttons)
->fill($data)
ActionGroup::make($buttons)
->fill($data)
ActionGroup::make($buttons)
->fill($data)
ActionGroup::make($buttons)
->fill($data)
ActionGroup::make($buttons)
->fill($data)
Вы можете удобно манипулировать набором ActionButton с помощью методов add(), prepend() и addMany().
ActionGroup::make($buttons)
->add(ActionButton::make('Button 3'))
ActionGroup::make($buttons)
->add(ActionButton::make('Button 3'))
ActionGroup::make($buttons)
->add(ActionButton::make('Button 3'))
ActionGroup::make($buttons)
->add(ActionButton::make('Button 3'))
ActionGroup::make($buttons)
->add(ActionButton::make('Button 3'))
ActionGroup::make($buttons)
->prepend(ActionButton::make('Button 4'))
ActionGroup::make($buttons)
->prepend(ActionButton::make('Button 4'))
ActionGroup::make($buttons)
->prepend(ActionButton::make('Button 4'))
ActionGroup::make($buttons)
->prepend(ActionButton::make('Button 4'))
ActionGroup::make($buttons)
->prepend(ActionButton::make('Button 4'))
ActionGroup::make($buttons)
->addMany([
ActionButton::make('Button 5'),
ActionButton::make('Button 6'),
])
ActionGroup::make($buttons)
->addMany([
ActionButton::make('Button 5'),
ActionButton::make('Button 6'),
])
ActionGroup::make($buttons)
->addMany([
ActionButton::make('Button 5'),
ActionButton::make('Button 6'),
])
ActionGroup::make($buttons)
->addMany([
ActionButton::make('Button 5'),
ActionButton::make('Button 6'),
])
ActionGroup::make($buttons)
->addMany([
ActionButton::make('Button 5'),
ActionButton::make('Button 6'),
])