Páginas · Laravilt
API Actions
Add custom actions to resource API endpoints
Add custom actions to your resource API endpoints.
Basic Action
php
Action with Validation
php
Bulk Action
php
Collection Action (No Record)
php
API Action Methods
| Method | Description |
|---|---|
make() | Create action |
label() | Action label |
description() | Action description |
icon() | Lucide icon |
color() | Color theme |
get() / post() / patch() | HTTP method |
requiresRecord() | Needs record context |
bulk() | Bulk action |
rules() | Validation rules |
fields() | Input fields |
confirmable() | Confirmation message |
successMessage() | Success notification |
action() | Action callback |