Schema Builder
Design multiple tables on a visual canvas, connect them with one-to-many, one-to-one or many-to-many relations, and set column types, nullable/unique rules and defaults.
mcrud/schema-studio gives Laravel projects a browser-based schema builder that generates CRUD, translations, dashboards, roles and permissions.
View on GitHubDesign multiple tables on a visual canvas, connect them with one-to-many, one-to-one or many-to-many relations, and set column types, nullable/unique rules and defaults.
The studio and the generated code speak English and Arabic, with automatic RTL.
Authentication, rate limiting, a locked-down studio and optional roles and permissions with Spatie.
composer require mcrud/schema-studio
php artisan vendor:publish --tag=crud-config
Laravel package discovery registers the package automatically. Open /crud-generator in your application to begin. For roles and permissions also run composer require spatie/laravel-permission, publish its migration with vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="permission-migrations" and migrate; without it the generated code simply requires a logged-in user.
Category and Product and define their columns. Drag ⋮⋮ to reorder columns.admin, editor.For every table: migration, Eloquent model with relationships, resource controller, route registration and Blade index/form views. Many-to-many relations also get a pivot migration.
A permission seeder per resource creates permissions and assigns them to the selected roles. Controllers protect each selected action.
Language files are placed in lang/en and/or lang/ar, and generated views use Laravel’s __() helper.
Adds parent_id (foreignId, constrained) to the child table, with hasMany and belongsTo methods.
Same as one to many, but the foreign key is unique and the parent uses hasOne.
Creates a pivot table such as category_product and belongsToMany on both models.
Migrations are ordered so parent tables are created first. Circular one-to-many or one-to-one relations are rejected.
With Run migrations & seed permissions enabled, the generator runs php artisan migrate --force (all pending migrations) and then every generated permission seeder. If a step fails, the files are kept and the message tells you what to run manually. To do it yourself:
php artisan migrate
php artisan db:seed --class=ProductPermissionSeeder
Create dashboard adds /dashboard with a count card linking to every generated table. It is skipped when a dashboard already exists.
A sidebar and topbar with a mobile drawer, dark mode and RTL. Choose admin or simple with crud.layout.
Count cards, a 30-day growth chart per table and the latest records. Tables a user may not view are hidden.
Every generated file is a stub. Publish them with --tag=crud-stubs and change what you need.
Tick Generate authentication (or run php artisan crud:generate schema.json --auth) for login, forgot and reset password, a profile page, optional public registration and optional email verification. Every generated route then requires login, and login, registration and forgot-password are rate limited. With permissions you also get users and roles management with a permission matrix, and an AdminUserSeeder that creates the first administrator from ADMIN_EMAIL and ADMIN_PASSWORD. It is skipped when your application already has a login route.
password, color, slug, image and file join the standard types, with hashing, uploads and generated slugs handled for you.
Date-range filters, column visibility, CSV export and import, bulk delete and, for soft-delete tables, restore and delete forever.
Foreign keys to big tables become a search box instead of a huge dropdown (crud.lookup_threshold).
The generator never overwrites your files. After changing the schema, review and merge with:
php artisan crud:diff schema.json
php artisan crud:sync schema.json # merge with conflict markers, *.bak kept
php artisan crud:sync schema.json --force # replace differing files
Planned: polymorphic relations, a role-column permission driver that does not need Spatie, file uploads and restore in the generated API, crud:sync for migrations and routes, translated generated pages, and Livewire or Inertia output. See the changelog for what shipped.
Publish configuration with the install command above. Because the generator writes files and can run migrations, outside local development it answers 403 until you set crud.ability to a Gate ability (or set crud.require_ability to false behind your own admin middleware). Its endpoints are rate limited, and it never runs in production unless you allow it. Never expose it publicly. It never overwrites existing files: tables whose model, controller, view or migration already exist are skipped, so you can re-run it to add new tables.