exodusanto/administrator
Administrator is a Laravel package for quickly building admin panels and managing application data. It provides CRUD screens, model management, and a customizable backend UI to help you add administrative interfaces without writing boilerplate.
composer require exodusanto/administrator
config/app.php (this package predates auto-discovery reliably working for older Laravel branches):
'providers' => [
'Exodusanto\Administrator\AdministratorServiceProvider',
],
'aliases' => [
'Admin' => 'Exodusanto\Administrator\Facades\Administrator',
],
php artisan vendor:publish
php artisan admin:install
This drops config/administrator.php and scaffolds config/administrator/ — that directory is the heart of the package. Look here first; the entire admin UI is derived from these config files, not from migrations or model schemas.config/administrator/users.php:
return [
'title' => 'Users',
'single' => 'user',
'model' => 'App\User',
'columns' => ['id', 'name', 'email'],
'edit_fields' => [
'name' => ['type' => 'text'],
'email' => ['type' => 'text'],
],
];
/admin — you should see a sidebar entry for Users with full CRUD, filtering, and pagination generated automatically. Your first real use case is almost always the users table plus one or two domain tables (posts/orders/products), because that instantly buys you a backoffice without writing controllers or views.config/administrator/ maps to a route and a menu entry. Keep filenames lowercase and matching the URL you want (config/administrator/blog_posts.php → /admin/blog_posts).columns supports 'relation.name' dot notation and a 'select' expression for computed columns:
'columns' => [
'id',
'profile.company' => ['title' => 'Company'],
'total' => ['select' => 'SUM(orders.amount)'],
],
edit_fields is your form builder. Use type (text, textarea, wysiwyg, image, file, enum, key, markdown), plus relationship for FK pickers:
'edit_fields' => [
'author' => ['type' => 'relationship', 'name_field' => 'name'],
'status' => ['type' => 'enum', 'options' => ['draft', 'published']],
],
filters per column. These become the search/filter bar above the table — extremely cheap compared to building custom filter UIs:
'filters' => [
'created_at' => ['type' => 'date', 'title' => 'Created'],
'status' => ['type' => 'enum', 'options' => [...]],
],
actions let you run code across selected rows from the index view — a clean place for "Publish", "Export CSV", "Archive":
'actions' => [
'publish' => [
'title' => 'Publish Selected',
'messages' => ['active' => 'Publishing...'],
'action' => function ($query) { $query->update(['status' => 'published']); },
],
],
permission closure in config/administrator.php. This is the standard integration point with Laravel auth / roles:
'permission' => function () {
return Auth::check() && Auth::user()->is_admin;
},
Admin facade for menu customization and route wiring — e.g. Admin::menu([...]) in a service provider to reorder or group items, and Admin::model('User')->... for programmatic access.php artisan view:publish) rather than editing vendor files — this is the primary extension point for branding, layout, and per-field rendering tweaks.composer.json and be prepared to maintain or fork it. Do not assume it works with the newest Laravel — check the composer.json of the repo for the illuminate/* constraints before adopting.php artisan config:cache in production will bake in config/administrator/*.php files, and any closures (permission, action, visible) will fail to serialize. Run config:clear when debugging "my file doesn't appear in the menu."single key, and $model class is the #1 source of silent empty pages. The single value must be singular and unique across all config files.rules per field, not in FormRequests. The package's own validation layer is what the UI trusts; a custom FormRequest won't run. Use rules and messages keys inside edit_fields.'type' => 'relationship' with name_field; for many-to-many add 'multiple' => true and ensure the pivot table exists — the package does not create migrations for you.dd(Admin::model('user')->getColumns()) from php artisan tinker is the fastest way to see why a column or field isn't rendering./admin routes. The package registers its route group early; if you have a custom admin area, either move the package's prefix (config('administrator.prefix')) or load your routes later with a distinct prefix.field classes, custom column types, the Admin::menu() hook, published views, and the actions closures. Almost everything else is hardcoded in the vendor tree — fork if you need deeper changes.How can I help you explore Laravel packages today?