Building a blog today is not just about writing posts. It is about creating a fast, clean, and scalable system that can grow with your content. That is where Laravel and Filament come in.
Laravel is one of the most powerful PHP frameworks for modern web development. It gives you full control over your application. On the other hand, Filament makes backend development much easier. It provides a beautiful admin panel where you can manage your blog without writing complex code.
When you combine Laravel with Filament, you get a complete blogging system. You can create posts, manage categories, handle users, and control content from a simple dashboard. Everything feels smooth and developer-friendly.
In this guide, you will learn how to build a modern Laravel blog using Filament step by step. We will start from setting up the project and move all the way to building a fully functional blog system with a clean admin panel and public frontend.
By the end of this tutorial, you will not just understand how it works. You will also be able to build your own scalable blog system that is easy to maintain and ready for real-world use.
What is Filament in Laravel?
Filament is a modern admin panel builder for Laravel. It helps developers create powerful backend systems without spending too much time on repetitive code. Instead of building dashboards from scratch, you get ready-made tools to manage your application.
It works directly on top of Laravel. This means you still use Laravel’s structure, but Filament gives you a clean interface to control everything. You can manage posts, users, categories, and more from a simple and fast dashboard.
One of the best things about Filament is its simplicity. You can create forms, tables, and pages with very little code. It also follows Laravel’s best practices, so everything stays organized and scalable.
Filament is widely used for building CMS platforms, admin dashboards, and internal tools. For a blog system, it becomes a perfect choice because it allows you to focus on content and features instead of backend complexity.
In short, Filament turns Laravel into a complete admin experience. It saves time, reduces effort, and helps you build modern applications much faster.
Prerequisites Before Building the Blog
Before we start building a modern Laravel blog with Filament, you need to make sure your system is ready. These basic requirements will help you avoid errors during setup and development.
First, you should have a good understanding of PHP and Laravel basics. You don’t need to be an expert, but you should know how Laravel projects work, including routes, controllers, and migrations.
Next, you need PHP installed on your system. Laravel works best with the latest stable PHP version. Along with that, you will also need Composer. Composer helps you install and manage Laravel and its packages easily.
You will also need a database system like MySQL. This will store your blog data such as posts, users, and categories. Make sure your database is properly configured before moving forward.
Node.js and NPM are also required. These tools help you manage frontend assets and compile CSS and JavaScript files for your Laravel project.
Finally, it is helpful to have a local development environment like XAMPP, Laragon, or Valet. This will allow you to run your Laravel project on your computer without needing a live server.
Once you have all these tools ready, you are fully prepared to start building your Laravel blog with Filament.
Setting Up a New Laravel Project
Now it’s time to start building your blog by creating a fresh Laravel project. This is the foundation of your entire application, so make sure everything is set up correctly.
First, open your terminal or command prompt. Then run the following command to create a new Laravel project:
composer create-project laravel/laravel laravel-blog
This command will download and install a fresh Laravel setup on your system. It may take a few minutes depending on your internet speed.
After installation, move into your project folder using:
cd laravel-blog
Now you need to configure your environment file. Open the .env file and set your database details like database name, username, and password. This step is very important because your blog data will be stored here.
Next, run the migration command to create the default tables in your database:
php artisan migrate
Once migrations are complete, start your local development server with:
php artisan serve
Now open your browser and visit:
http://127.0.0.1:8000
If you see the Laravel welcome page, it means your project is set up successfully.
At this stage, your Laravel environment is ready. In the next step, we will install Filament and turn this basic setup into a powerful admin-driven blog system.
Installing Filament in Laravel
Now that your Laravel project is ready, the next step is to install Filament. This will turn your simple Laravel setup into a powerful admin dashboard for managing your blog.
First, open your terminal in your project directory. Then run the following Composer command:
composer require filament/filament
This command will install Filament and all required dependencies into your Laravel project.
After installation, you need to publish Filament’s configuration and setup the admin panel. Run this command:
php artisan filament:install
This will set up the Filament admin panel structure inside your project.
Next, you need to create an admin user so you can log in to the dashboard. Run:
php artisan make:filament-user
It will ask you for name, email, and password. Enter your details carefully because you will use these credentials to access the admin panel.
Once the user is created, start your Laravel server if it is not running:
php artisan serve
Now open your browser and go to:
http://127.0.0.1:8000/admin
Log in using the admin credentials you just created. If everything is set up correctly, you will see the Filament dashboard.
At this point, your Laravel application is no longer just a basic project. It now has a fully functional admin panel ready for building your blog system.
Designing the Blog Database Structure
Now we will design the foundation of your blog system: the database structure. This step is very important because your entire blog depends on how well your data is organized.
A good blog system usually has three main parts: posts, categories, and users. Each part plays a specific role in managing your content.
Posts Table
The posts table will store all your blog articles. Each post should include the following fields:
- Title: The main heading of the blog post
- Slug: A URL-friendly version of the title
- Content: The full article body
- Featured Image: The main image of the post
- Status: To control whether a post is draft or published
- Timestamps: To track creation and update time
This table is the core of your blog system.
Categories Table
Categories help you organize your blog posts. Instead of mixing all content together, you can group posts into topics.
Each category should include:
- Name: Category title
- Slug: SEO-friendly URL
- Description: Optional details about the category
This makes your blog more structured and user-friendly.
Users Table
Laravel already provides a users table by default. We will use it to manage blog authors and admins.
Later, we can extend it to support roles like:
- Admin
- Editor
- Author
This helps control who can create, edit, or publish posts.
Relationships Between Tables
To make the blog system powerful, we need relationships:
- One category can have many posts
- One user can create many posts
- Each post belongs to one category and one user
These relationships make data management clean and scalable.
With this structure in place, your blog will be organized, flexible, and ready for Filament integration in the next step.
Creating Filament Resources for Blog System
Now we move to one of the most powerful parts of Filament. This is where you turn your database into a fully working admin system.
Filament uses something called Resources. A resource connects your database tables with the admin panel. It allows you to create, read, update, and delete data easily.
We will now create resources for Posts and Categories.
7.1 Post Resource
First, we will generate a resource for blog posts.
Run this command in your terminal:
php artisan make:filament-resource Post
This command will create all necessary files for managing posts inside the Filament dashboard.
Now open the generated Post Resource file. You will see two important parts:
- Form → Used to create and edit posts
- Table → Used to display posts in admin panel
In the form section, you will add fields like:
- Title input
- Slug input
- Rich text editor for content
- Image upload for featured image
- Select field for status (draft/published)
In the table section, you will define columns like:
- Post title
- Category name
- Status
- Created date
This will give you a clean and professional post management system inside your admin panel.
7.2 Category Resource
Now we will create a resource for categories.
Run this command:
php artisan make:filament-resource Category
Just like posts, this will generate a full CRUD system for categories.
Inside the form, you will add:
- Category name
- Slug
- Description (optional)
Inside the table, you can display:
- Category name
- Slug
- Number of posts (optional improvement)
Why This Step is Important
With these resources, you no longer need to write manual CRUD logic. Filament handles everything for you.
Now your admin panel can manage blog content visually, without complexity. This is what makes Filament powerful for modern Laravel applications.
In the next step, we will improve content editing with a rich text editor and make the blog system more professional.
Adding Rich Text Editor for Blog Content
Now your blog system is working, but we still need to improve how you write and format content. A modern blog is not just plain text. It needs headings, images, links, and proper formatting.
For this, we will add a rich text editor inside Filament. This will make it easy to create professional-looking blog posts directly from the admin panel.
Choosing a Rich Text Editor
Filament supports different editors through plugins. You can use options like:
- Tiptap Editor
- TinyMCE integration
- Markdown editor (for simple blogs)
For a modern blog system, Tiptap Editor is a great choice because it is flexible and developer-friendly.
Installing Rich Text Editor in Filament
First, install the editor package using Composer:
composer require awcodes/filament-tiptap-editor
After installation, publish the assets if required and clear the cache:
php artisan optimize:clear
Updating the Post Resource Form
Now open your Post Resource file and update the content field.
Replace the basic textarea with the Tiptap editor field:
Forms\Components\RichEditor::make('content')
->label('Content')
->required(),
Or if using Tiptap:
Forms\Components\TiptapEditor::make('content')
->label('Content')
->required(),
This will instantly upgrade your blog editor.
What You Can Do Now
With the rich text editor, you can now:
- Format text with headings and styles
- Add images inside blog content
- Insert links easily
- Structure content like a professional blog
Implementing Slug Generation & SEO Optimization
Now we make your blog more powerful for search engines. A good blog is not only about writing content. It is also about how well it performs on Google. That is where SEO optimization and clean URLs come in.
Auto Slug Generation
A slug is the URL part of your blog post. For example:
yourblog.com/how-to-build-laravel-blog
Instead of writing slugs manually, we will generate them automatically from the title.
In your Post Resource form, you can add slug generation like this:
Forms\Components\TextInput::make('title')
->required()
->reactive()
->afterStateUpdated(function ($state, callable $set) {
$set('slug', \Str::slug($state));
});
Then make sure your slug field is:
Forms\Components\TextInput::make('slug')
->required()
->unique()
This ensures every post has a clean, SEO-friendly URL.
Adding Meta Title and Meta Description
To improve SEO, we should also store meta information for each post.
Add these fields in your Post Resource form:
- Meta Title
- Meta Description
Example:
Forms\Components\TextInput::make('meta_title')
->maxLength(60),
Forms\Components\Textarea::make('meta_description')
->maxLength(160),
These fields help search engines understand your content better.
SEO-Friendly URLs
Make sure your routes use slugs instead of IDs.
Example route:
Route::get('/blog/{slug}', [BlogController::class, 'show']);
This keeps URLs clean, readable, and SEO optimized.
Creating Frontend Blog Pages (Public View)
Now your admin panel is ready, and your content system is working. But a blog is not complete until users can read posts on the frontend.
In this step, we will build the public-facing part of your Laravel blog. This includes the blog listing page and the single post page.
Setting Up Routes for Blog
First, we need routes to handle blog pages. Open your web.php file and add:
Route::get('/blog', [BlogController::class, 'index']);
Route::get('/blog/{slug}', [BlogController::class, 'show']);
This gives you:
- A page to show all blog posts
- A page to show a single blog post
Creating the Blog Controller
Now create a controller:
php artisan make:controller BlogController
Inside the controller, we will handle data.
For blog listing page:
public function index()
{
$posts = Post::where('status', 'published')->latest()->get();
return view('blog.index', compact('posts'));
}
For single blog post:
public function show($slug)
{
$post = Post::where('slug', $slug)->firstOrFail();
return view('blog.show', compact('post'));
}
Building Blog Listing Page
Now create a Blade file:
resources/views/blog/index.blade.php
Here you will display all posts in a simple layout:
- Post title
- Featured image
- Short description or excerpt
- Read more button
Keep the design clean and readable. Focus on user experience.
Building Single Post Page
Create another file:
resources/views/blog/show.blade.php
This page will display:
- Blog title
- Featured image
- Full content
- Author name (optional)
- Published date
Make sure content is properly formatted using:
{!! $post->content !!}
This allows rich text content to display correctly.
Adding Category Filtering (Optional Improvement)
You can also improve user experience by adding category pages later.
Example route:
Route::get('/category/{slug}', [CategoryController::class, 'show']);
This helps users browse related content easily.
Why This Step is Important
This step connects everything together.
Now your system has:
- Admin panel (Filament)
- Content management system (Laravel backend)
- Public blog website (frontend)
Users can finally read your content, which is the main goal of a blog.
In the next step, we will add authentication and user roles to control who can create and manage blog posts.
Adding Authentication & User Roles
Now your blog system is almost complete, but it still needs proper control over who can manage content. In a real-world blog, not every user should have full admin access. That is why we add authentication and user roles.
This step helps you control permissions like:
- Who can create posts
- Who can edit posts
- Who can publish content
Basic Authentication Setup
Laravel already provides authentication tools, so we don’t need to build everything from scratch.
If you are using Laravel Breeze or similar starter kit, you can install it using:
composer require laravel/breeze --dev
php artisan breeze:install
php artisan migrate
npm install && npm run dev
This gives you:
- Login system
- Registration system
- Password reset
- Basic user dashboard
Integrating Users with Posts
Now we connect users with blog posts.
Each post should belong to a user. So we add a relationship in your Post model:
public function user()
{
return $this->belongsTo(User::class);
}
And in your User model:
public function posts()
{
return $this->hasMany(Post::class);
}
Now every post knows who created it.
Adding Role System
To manage roles like Admin and Author, we can use a simple approach or a package like Spatie Permission.
Install it using:
composer require spatie/laravel-permission
Then publish and migrate:
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
php artisan migrate
Defining Roles
Now you can create roles like:
- Admin
- Editor
- Author
Example:
use Spatie\Permission\Models\Role;
Role::create(['name' => 'Admin']);
Role::create(['name' => 'Author']);
Assigning Roles to Users
You can assign roles like this:
$user->assignRole('Admin');
Now you can control access based on roles.
Controlling Access in Filament
Filament also supports permissions. You can restrict features based on roles.
For example:
- Only Admin can delete posts
- Authors can only create and edit their own posts
This keeps your system secure and organized.
Why This Step Matters
Without roles and authentication, your blog has no control system. Anyone could access everything.
Now you have:
- Secure login system
- User-based content creation
- Role-based permissions
- Controlled admin access
This makes your Laravel blog a real production-ready application.
In the next step, we will optimize performance and make your blog faster, scalable, and more efficient.
Optimizing Blog Performance
Now your Laravel blog is fully functional. But if you want it to work smoothly at scale, performance optimization is very important. A slow blog loses users and also ranks lower on Google.
In this step, we will make your blog faster, more efficient, and production-ready.
Using Caching for Better Speed
Caching reduces database load and improves page speed. Instead of fetching posts again and again, Laravel can store them temporarily.
For example, cache your blog posts like this:
$posts = Cache::remember('blog_posts', 60, function () {
return Post::where('status', 'published')->latest()->get();
});
This stores posts for 60 minutes and reduces repeated database queries.
Optimizing Database Queries
Avoid unnecessary queries inside loops. Always use eager loading when dealing with relationships.
Example:
$posts = Post::with('user', 'category')->latest()->get();
This loads related data in a single query and improves performance.
Image Optimization
Images are often the biggest reason for slow websites. You should always:
- Compress images before upload
- Use modern formats like WebP
- Limit image size for featured images
You can also use Laravel packages for automatic image optimization.
Lazy Loading Content
Lazy loading helps load content only when needed. This improves initial page speed.
For images, you can use:
<img src="image.jpg" loading="lazy">
This ensures images load only when users scroll.
Use Pagination for Blog Posts
Never load all posts at once. Always use pagination.
$posts = Post::where('status', 'published')->paginate(10);
This improves performance and gives a better user experience.
Minify Assets
Your CSS and JavaScript should always be optimized.
Run:
npm run build
This compiles and minifies your frontend assets.
Enable OPcache (Server Side)
If you are using a production server, enable OPcache in PHP. It stores compiled code in memory and speeds up execution.
Why This Step Matters
Performance directly affects:
- SEO rankings
- User experience
- Bounce rate
- Server load
A fast blog keeps users engaged and helps your content rank higher on search engines.
Now your Laravel blog is not just functional—it is also optimized for speed and scalability.
In the next step, we will focus on SEO best practices for your Laravel blog to help you rank higher on Google.
SEO Best Practices for Laravel Blog
Now your blog is fast and fully functional. The next step is making sure it actually ranks on Google. SEO is what brings organic traffic to your blog without paid ads.
In this section, we will cover the most important SEO practices for a Laravel + Filament blog.
Clean and SEO-Friendly URLs
Your URLs should always be simple, readable, and keyword-based.
Good example:
/blog/how-to-build-laravel-blog
Bad example:
/blog/12345?id=99
Always use slugs instead of IDs. This helps search engines understand your content better.
XML Sitemap Generation
A sitemap helps Google discover all your blog pages easily.
You can generate a sitemap using a Laravel package like:
composer require spatie/laravel-sitemap
Then generate sitemap:
use Spatie\Sitemap\Sitemap;
use Spatie\Sitemap\Tags\Url;
Sitemap::create()
->add(Url::create('/blog'))
->writeToFile(public_path('sitemap.xml'));
Submit this sitemap to Google Search Console.
Robots.txt Setup
Your robots.txt file tells search engines what to index.
Example:
User-agent: *
Allow: /blog
Disallow: /admin
Sitemap: https://yourdomain.com/sitemap.xml
This keeps your admin panel hidden and blog pages visible.
Schema Markup for Articles
Schema helps Google understand your content better and can improve rich results.
Add Article schema in your blog post page:
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Blog Title",
"author": "Author Name",
"datePublished": "2026-01-01",
"dateModified": "2026-01-01"
}
Internal Linking Strategy
Internal links help users navigate and improve SEO strength.
You should:
- Link related blog posts
- Add “Read more” sections
- Connect categories and tags
This increases page views and reduces bounce rate.
Optimize Meta Tags
Each blog post should have:
- Meta Title (under 60 characters)
- Meta Description (under 160 characters)
Example:
<meta name="description" content="Learn how to build a modern Laravel blog using Filament step by step." />
Image SEO Optimization
Images also help SEO when optimized properly.
Always:
- Use descriptive file names
- Add ALT text
- Compress images
- Use WebP format when possible
Example:
<img src="laravel-blog.jpg" alt="Laravel blog built with Filament admin panel">
Deploying Laravel Blog to Live Server
Now your Laravel blog is complete, optimized, and ready for real users. The final step is deployment. This is where you move your project from local machine to a live server so anyone on the internet can access it.
A proper deployment ensures your blog runs smoothly, securely, and without downtime.
Choosing a Hosting Environment
You have two main options:
- Shared Hosting (basic blogs, low traffic)
- VPS or Cloud Server (recommended for scalability)
For a Laravel + Filament project, a VPS or cloud server is always better because it gives full control.
Uploading Project Files
Upload your Laravel project to your server using:
- Git (recommended)
- FTP/SFTP
- File manager (not recommended for large projects)
Make sure your project is placed outside the public root except the public folder.
Setting Up Environment File
On your live server, update your .env file:
APP_ENV=production
APP_DEBUG=false
APP_URL=https://yourdomain.com
Also configure:
- Database credentials
- Mail settings
- Cache settings
Running Composer Install
On the server, run:
composer install --optimize-autoloader --no-dev
This installs only production dependencies.
Running Migrations
Now set up your database:
php artisan migrate --force
This creates all required tables on the live database.
Setting Proper Permissions
Make sure these folders are writable:
- storage
- bootstrap/cache
Example:
chmod -R 775 storage bootstrap/cache
Linking Storage for Images
To make images work properly:
php artisan storage:link
This connects your public storage folder.
Optimizing Laravel for Production
Run these commands to boost performance:
php artisan config:cache
php artisan route:cache
php artisan view:cache
This makes your application faster in production.
Setting Up Domain and SSL
Point your domain to the server and install SSL (HTTPS).
Use tools like:
- Let’s Encrypt (free SSL)
- Cloudflare (recommended for security)
Final Testing
Before going live completely:
- Test blog pages
- Test admin panel
- Check image uploads
- Verify SEO URLs
Why This Step Matters
Deployment is the final stage where your work becomes a real product.
Now your blog is:
- Live on the internet
- Accessible worldwide
- Fully functional and scalable
Common Issues & Fixes
Even after successful setup and deployment, you may face some common issues in a Laravel + Filament blog. These problems are normal and can be fixed easily if you understand the root cause.
In this section, we will cover the most frequent issues and their solutions.
Filament Admin Panel Not Opening
Sometimes the /admin route does not work after setup.
Possible fixes:
- Check if Filament is properly installed
- Run migrations again
- Clear application cache
php artisan optimize:clear
Also make sure your admin user is created correctly.
Login Issues in Filament
If you cannot log in to the admin panel:
- Verify email and password
- Check database users table
- Ensure user exists and password is hashed
You can also recreate the admin user:
php artisan make:filament-user
Images Not Showing in Blog
This is a very common issue in Laravel projects.
Fix it by:
- Running storage link command
php artisan storage:link
- Checking file permissions
- Ensuring correct image path is used
Migration Errors
If database tables are not created:
- Check .env database credentials
- Ensure database exists
- Run migrations again
php artisan migrate:fresh
⚠️ Use migrate:fresh carefully because it resets tables.
Filament Resources Not Updating
Sometimes changes do not appear in admin panel.
Fix:
- Clear cache
- Restart server
- Regenerate config
php artisan optimize:clear
Slow Website Performance
If your blog becomes slow:
- Enable caching
- Use pagination
- Optimize images
- Minify assets
These steps were covered earlier in performance optimization.
500 Server Error on Live Server
This is usually caused by:
- Wrong .env configuration
- Missing dependencies
- File permission issues
Check Laravel logs:
storage/logs/laravel.log
Why This Step Matters
Every real-world developer faces these issues. The difference is knowing how to fix them quickly.
By solving these problems, your Laravel blog becomes:
- More stable
- More professional
- Production-ready
Now your project is almost complete. In the final step, we will wrap everything up with a strong conclusion and future improvements.
Conclusion: Building a Scalable Laravel Blog with Filament
You have now built a complete modern blog system using Laravel and Filament. From setup to deployment, you followed a full development workflow that is used in real-world applications.
This is not just a simple blog project. It is a scalable content management system that can grow with your needs.
What You Have Achieved
By following this guide, you have successfully:
- Set up a fresh Laravel project
- Installed and configured Filament admin panel
- Designed a clean database structure
- Created dynamic blog and category systems
- Built a rich text content editor
- Implemented SEO-friendly URLs and metadata
- Developed frontend blog pages
- Added authentication and role management
- Optimized performance for speed
- Applied SEO best practices
- Deployed your project to a live server
- Fixed common real-world issues
Why This Stack is Powerful
Laravel gives you flexibility and control. Filament adds speed and simplicity to backend development.
Together, they help you build:
- CMS platforms
- SaaS products
- Blogging systems
- Admin dashboards
Without writing unnecessary complex code.
Future Improvements You Can Add
If you want to take this project even further, here are some advanced upgrades:
- Comment system for blog posts
- Tag system for better categorization
- API for mobile apps
- Newsletter integration
- SEO automation tools
- Analytics dashboard
- Multi-author publishing system
Final Thoughts
Building a blog is not just about writing code. It is about creating a system that delivers content in a clean, fast, and structured way.
With Laravel and Filament, you now have the foundation of a professional-grade blogging platform that can easily scale into a larger product or business.
Keep improving it, keep optimizing it, and turn it into something powerful.