Elevate Your Blogging Experience With Firefly/Filament-Blog In Laravel
Published on April 22, 2024 by Dinesh Uprety

Introduction
The firefly/filament-blog package is an advanced blogging solution designed for the Filament Admin Panel. It offers a range of features to enhance your blog posts, including SEO meta extensions, scheduled posts, social media sharing, and more.
Prerequisites
Before you begin, ensure you have Laravel 11 and Filament 3.x installed in your project. If not, you can install them using the following commands:
composer require filament/filament:"^3.2" -Wphp artisan filament:install --panels
Installation
To install the firefly/filament-blog package, run the following command:
composer require firefly/filament-blog
Configuration
After installation, publish the configuration and migration files with:
php artisan filament-blog:install
This command will publish filamentblog.php
config file and create_blog_tables.php
migration file.
<?php /** * |-------------------------------------------------------------------------- * | Set up your blog configuration * |-------------------------------------------------------------------------- * | * | The route configuration is for setting up the route prefix and middleware. * | The user configuration is for setting up the user model and columns. * | The seo configuration is for setting up the default meta tags for the blog. * | The recaptcha configuration is for setting up the recaptcha for the blog. */ use Firefly\FilamentBlog\Models\User; return [ 'route' => [
'prefix' => 'blogs', 'middleware' => ['web'],// 'home' => [// 'name' => 'filamentblog.home',// 'url' => env('APP_URL'),// ], 'login' => [ 'name' => 'filamentblog.post.login', ], ], 'user' => [
'model' => User::class, 'foreign_key' => 'user_id', 'columns' => [ 'name' => 'name', 'avatar' => 'profile_photo_path', // column name for avatar ], ], 'seo' => [ 'meta' => [ 'title' => 'Filament Blog', 'description' => 'This is filament blog seo meta description', 'keywords' => [], ], ], 'recaptcha' => [ 'enabled' => false, // true or false 'site_key' => env('RECAPTCHA_SITE_KEY'), 'secret_key' => env('RECAPTCHA_SECRET_KEY'), ],];
Usage
With the firefly/filament-blog package installed, you can now access the blog management interface through the Filament Admin Panel. Create, edit, and manage your posts with ease, utilizing the powerful features provided by the package.
Features
-
SEO Meta Extension: Customize meta tags for each post to improve search engine visibility.
-
Post Scheduling: Plan your content calendar by scheduling posts for future publication.
-
Social Media Integration: Allow readers to share your content across social platforms.
-
Comment System: Engage with your audience through an integrated commenting system.
-
Newsletter Subscription: Grow your mailing list with newsletter sign-up forms.
-
Category Management: Organize your posts with categories for easy navigation.
For a detailed walkthrough, refer to the Official documentation and GitHub repository.
By following this guide, you'll be able to integrate the firefly/filament-blog package into your Laravel application, enhancing your blog's functionality and user experience. Remember to keep your SEO data updated to ensure the best visibility for your content.