Kritim Yantra
Mar 30, 2025
If you're looking to build a web application with an elegant admin interface, Laravel 12 and Filament make an unbeatable combination. Laravel, the popular PHP framework, provides a solid foundation, while Filament offers a sleek, no-code admin panel builder.
In this guide, we'll walk through setting up Laravel 12, installing Filament, and creating a simple blog management system—all with minimal coding.
Laravel is a powerful PHP framework that simplifies web development with features like:
Filament is an open-source tool built on the TALL stack (Tailwind, Alpine.js, Livewire, Laravel). It provides:
Together, they allow developers to build full-featured admin dashboards quickly.
Run:
laravel new blog-project
Or with Composer:
composer create-project laravel/laravel blog-project
Pro Tip: Choose a starter kit with authentication (like Breeze or Jetstream) to handle user management.
Navigate into your project:
cd blog-project
Install Filament:
composer require filament/filament:"^3.3" -W
Set up the admin panel:
php artisan filament:install --panels
This creates:
app/Providers/Filament/AdminPanelProvider.php
/admin
)Run:
php artisan make:filament-user
Follow the prompts to set an email and password.
Now, visit http://localhost:8000/admin
and log in!
Update app/Models/User.php
to implement FilamentUser
:
use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;
class User extends Authenticatable implements FilamentUser
{
// ... existing code ...
public function canAccessPanel(Panel $panel): bool
{
return true; // For now, allow all users
}
}
For production, restrict access:
return $this->email === 'admin@example.com';
php artisan make:model Post -m
Edit the migration (database/migrations/..._create_posts_table.php
):
Schema::create('posts', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->text('content');
$table->timestamps();
});
Run the migration:
php artisan migrate
php artisan make:filament-resource Post --generate
This auto-generates:
php artisan serve
Visit http://localhost:8000/admin/posts
to:
✅ Create new posts
✅ Edit existing ones
✅ Delete entries
Laravel 12 (released Feb 2025) ensures smooth upgrades, making it perfect for new projects.
With Laravel 12 and Filament, you can build a fully functional admin panel in minutes. Whether you're managing blog posts, e-commerce products, or user data, Filament handles the heavy lifting.
Happy coding! 🚀
Transform from beginner to Laravel expert with our personalized Coaching Class starting June 12, 2025. Limited enrollment ensures focused attention.
1-hour personalized coaching
Build portfolio applications
Industry-standard techniques
Interview prep & job guidance
Complete your application to secure your spot
Thank you for your interest in our Laravel mentorship program. We'll contact you within 24 hours with next steps.
No comments yet. Be the first to comment!
Please log in to post a comment:
Sign in with Google