Laravel TomatoPHP Admin & CRUD Generator
- Published on
- Reading time
- 3 min read
Meet TomatoPHP Admin: a Splade and Filament powered SPA dashboard for Laravel that generates a full CRUD from your migration in one command.
Have you tried to build an SPA? As a full-stack developer, I think it is straightforward when you use a frontend technology on top of your backend. Now it is easy to do with Splade, a new package that supports building SPA apps with just Blade, and I think it will change a lot for the Laravel community.
Because of this new tech, we on the TomatoPHP team built something unique with the FilamentPHP UI and Splade: a new dashboard and CRUD generator that makes your development faster and cleaner. In this post you will see what it offers, how to install it, and how to generate your first CRUD from a migration.
Note: this was written in early 2023 for the Splade-based tomato-admin; check the current TomatoPHP docs for the latest versions.
Demo
You can check out the live demo here.
Features
- SPA app with Blade
- CRUD generator for web and API
- Supports HMVC architecture
- Authentication and user manager
- Responsive UI using the Filament template
- RTL and dark mode support
- Ready-to-use Breeze toolkit with RTL and dark mode support
- Ready-to-use Arabic and English translations
- Easy-to-use menu with a provider
Install
Watch the installation walkthrough on YouTube: TomatoPHP admin installation video.
-
On a fresh Laravel project, require the admin panel:
composer require tomatophp/tomato-admin -
Publish the assets and get the dashboard ready with the install command:
php artisan tomato-admin:install -
Build your assets:
yarn && yarn build
Your admin panel is now ready to use.
Start your first CRUD
The generator works from your database schema, so you build a CRUD after you make a migration for your table. Let's say you need a customers table.
1. Create the migration
php artisan make:migration create_customers_table
2. Define the table schema
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCustomersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('customers', function (Blueprint $table) {
$table->id();
$table->string('name')->index();
$table->longText('bio')->nullable();
$table->string('email')->unique()->index();
$table->string('phone');
$table->text('address')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('customers');
}
}
3. Run the migration
php artisan migrate
4. Generate the CRUD
Here is the Tomato step. Run:
php artisan tomato:generate
It asks for the name of the table you created the migration for. If you like to use Laravel Modules, just answer y to the next question.
5. Register the menu
Register the generated menu in your config/tomato-admin config. You will find the menu class in App\Menus. Then cache your config:
php artisan config:cache
Boom, your CRUD is ready.
What is next?
Are we building just an empty admin panel? No, we built a lot of plugins on top of it.

- Tomato Roles
- Tomato Settings
- Tomato Notifications
- Tomato Forms
- Tomato API
- Tomato Artisan
- Tomato Browser
- Tomato Components
- Tomato Logs
- Tomato Dusk
- Tomato Backup
- Tomato Translations
- Tomato Subscription
These plugins make your app very easy to build, and we have a great support community behind them. You can find the full documentation of the package in the TomatoPHP docs.