الصفحات · Laravilt
Actions
Buttons that run server-side logic, open confirmation modals and forms, or navigate.
The laravilt/actions package provides Laravilt\Actions\Action and a set of prebuilt actions. An action is a button, link, or icon button. It can run a server-side closure, ask for confirmation, collect input in a modal form, or navigate to a URL. Actions appear in table rows, bulk toolbars, and table headers, and in page headers.
php
Closures get their arguments by parameter name: $record (the current record), $records or $ids (bulk selection), and $data (submitted form values).
In this section
- Styling: colors, icons, variants, sizes, and tooltips
- Confirmation: confirmation modals, slide-overs, and password prompts
- Forms: collect input or show details in a modal
- Notifications: feedback after an action runs
- Authorization: permissions, abilities, and visibility
- Action Types: View, Edit, Create, Delete, Restore, Force Delete, Replicate, Export, Import, and custom actions
- Bulk Actions: actions for multiple selected records
Generating action classes
bash
See Custom Action for how to use generated classes.