An admin for your Laravel app's database
Point Universal Admin at the database your Laravel app already uses. It reads the foreign keys your migrations declare and Laravel's naming, so your team gets a clear admin without a package or a resource class per model.
Run it
A new Laravel app keeps its SQLite database in database/; MySQL and Postgres work the same way:
./universal-admin --db sqlite:./database/database.sqlite
./universal-admin --db mysql://[email protected]:3306/laravel
What it reads from a Laravel app
| It sees | It does |
|---|---|
foreignId('user_id')->constrained() | A link that shows the user's name; the user's page gets tabs of their posts and comments, with counts |
password, remember_token | Hidden: never read, never written |
created_at, updated_at | Filled in on save, shown read-only |
email_verified_at | A date and time, shown in each viewer's own time |
boolean() columns (tinyint(1)) | Yes or No, settable on many rows at once |
A pivot table such as category_post | A linking table, out of the sidebar until you ask for it |
migrations, failed_jobs, password_reset_tokens, personal_access_tokens, job_batches, cache_locks; and cache, jobs, sessions when they have Laravel's shape | Hidden |
Every guess is only a default. When one is wrong, universal-admin init writes a config file from your database, one line per column, and a line in it changes the guess. Every setting is in the README.
Next to your app in production
Run it on the same server, with the database URL your app uses minus the password, so people log in with their own database accounts. Docker, systemd and HTTPS: Deploy.