Boost Your Workflow: Generate Laravel 12 CRUD in Seconds

A passionate full-stack developer from @ePlus.DEV
Search for a command to run...

A passionate full-stack developer from @ePlus.DEV
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling.
🚀 Introduction Large Language Models (LLMs) have transformed the landscape of artificial intelligence—enabling everything from smart chatbots and content generation to advanced, AI-driven applications. But integrating different AI providers into you...
Daily Tech Brief — 06/08/2026 Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary Claude Code 2.1.223 vá nhiều đường обх

Overview In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to

🏕️ Arcade Base Camp August 2026 Welcome to Arcade Base Camp August 2026, where you’ll develop key Google Cloud skills and earn an exclusive credential that will open doors to the cloud for you. No pr

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary Google Cloud giới thiệu hai Database Operations Agents hỗ trợ onboard

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary SK hynix và Sandisk công bố đặc tả mở đầu tiên cho High Bandwidth Fla

Okay, let’s be honest.
If you’ve built even one Laravel project, you’ve definitely done this: Create model → migration → controller → form request → add routes …every. single. time.
It’s boring, right? And kinda repetitive.
Well, good news - here’s a quick Laravel 12 tip to save your time (and sanity): Let’s make an Artisan command that generates all the basic CRUD stuff for you in one go.
What This Command Does You give it a name like:
php artisan make:crud Product
And it’ll auto-generate:
A Model
A Migration
A Controller (resource-style)
A Form Request
And even add the route for you
No more copy-paste or switching between 5 terminal commands. One and done.
Run this:
php artisan make:command GenerateCrud
Open up app/Console/Commands/GenerateCrud.php and drop this in:
<?PHP
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
class GenerateCrud extends Command
{
protected $signature = 'make:crud {name}';
protected $description = 'Quickly generate CRUD files';
public function handle(): void
{
$name = Str::studly($this->argument('name'));
$table = Str::snake(Str::plural($name));
$controller = "{$name}Controller";
$request = "{$name}Request";
// Create model + migration
$this->call('make:model', ['name' => $name, '--migration' => true]);
// Controller (resource style)
$this->call('make:controller', [
'name' => $controller,
'--resource' => true,
'--model' => $name,
]);
// Form request
$this->call('make:request', ['name' => $request]);
// Route
$route = "Route::resource('" . Str::kebab(Str::plural($name)) . "', \\App\\Http\\Controllers\\$controller::class);";
File::append(base_path('routes/web.php'), "\n" . $route);
$this->info("All done! CRUD for {$name} created.");
}
}
In app/Console/Kernel.php, register the command:
protected $commands = [
\App\Console\Commands\GenerateCrud::class,
];
php artisan make:crud Blog
app/Models/Blog.php
BlogController.php
BlogRequest.php
create_blogs_table migration
Route in routes/web.php
Want to take it further?
Auto-generate Blade views too (index, create, etc.)
Add API version ( - api)
Include soft deletes or timestamps
Laravel 12 gives you the tools. But building a dev-friendly workflow? That’s on us.
This CRUD generator command is a small thing - but it makes a big impact. It saves time, keeps your structure consistent, and lets you focus on what matters: building features, not boilerplate. Whether you’re a solo dev or part of a team, this trick adds serious value to your Laravel toolbox.
If you found this helpful, consider:
Bookmarking this page for future projects
Sharing it with your Laravel developer group or team
Commenting if you want an advanced version (like generating Blade views or API-only resources)
Thanks for reading, and happy coding!
Need Help with Your Laravel Project?
If you’re looking to update your existing Laravel project or develop a new one, our expert team at BrainsOfTech is here to help. Contact us today to bring your Laravel project to life with cutting-edge technology and best practices!
If you’re looking to update your existing Laravel project or develop a new one, our expert team at BrainsOfTech is here to help. Contact us today to bring your Laravel project to life with cutting-edge technology and best practices!