Quick Start
Create an admin controller by extendingAdminController:
That’s it! The
AdminController automatically provides index(), show(), store(), update(), and destroy() methods with proper pagination, search, and validation.Auto-Generated Features
The admin controller provides these features out of the box:- Listing: Paginated table with search and sorting
- Create: Form with validation
- Edit: Update records with validation
- Delete: Soft or hard delete with confirmation
- Search: Full-text search across defined fields
- Sorting: Click column headers to sort
- Pagination: Navigate large datasets easily
Admin Panel Builder
UseAdminPanel to generate a complete admin interface:
Admin Methods
Index (List)
Get paginated, searchable, sortable list:Show (Detail)
Get single record:Store (Create)
Create new record:Update (Edit)
Update existing record:Destroy (Delete)
Delete record:Customization
Override Methods
Customize behavior by overriding methods:Add Custom Actions
Extend with custom methods:Admin Theme
The default admin theme provides a modern, responsive UI:Features
- Dashboard: KPI cards, charts, and metrics
- Data Table: Sortable columns, search, pagination
- Forms: Create and edit with validation
- Responsive: Works on desktop, tablet, and mobile
- Dark Mode Ready: Easy theme customization
Styling
The theme uses Tailwind CSS and Font Awesome:Complete Example
Full admin setup for blog management:Multi-Model Admin
Manage multiple models in one dashboard:Performance Tips
Pagination
Pagination
Always use pagination for large datasets:
Eager Loading
Eager Loading
Load relationships to prevent N+1:
Selective Columns
Selective Columns
Only fetch needed columns:
Security
Protect admin endpoints with authentication:Next Steps
API Resources
Transform model responses
Authentication
Secure your admin panel