Pages · Laravilt
ImportAction
Import records from Excel or CSV files
Import records from Excel or CSV files using Laravel Excel.
Basic Usage
php
Default Configuration
- Icon: Upload
- Color: gray
- Requires Confirmation: Yes (shows file upload modal)
- Integrates with Laravel Excel (Maatwebsite)
Custom Importer Class
php
Import XLSX
php
Import CSV
php
Accepted File Types
php
Before Import Callback
php
After Import Callback
php
Queue Large Imports
php
API Reference
| Method | Parameters | Description |
|---|---|---|
make() | ?string $name | Create action |
importer() | string | Importer class |
xlsx() | — | Import XLSX files |
csv() | — | Import CSV files |
acceptedFileTypes() | array | Accepted MIME types |
beforeImport() | Closure | Before import hook |
afterImport() | Closure | After import hook |
queue() | — | Queue import |
chunkSize() | int | Chunk size |