Great question! This is a common scenario for many Laravel developers who want the flexibility and power of Laravel, but also need a simple, maintainable blog component.
Here are some options you can consider:
1. Build Your Own Blog in Laravel
Since you're already comfortable with Laravel, building a simple blog is very straightforward. You can create a Post model, migration, controller, and Blade views. This gives you full control and keeps everything in one codebase.
Example:
php artisan make:model Post -m
php artisan make:controller PostController --resource
Then, in your migration:
Schema::create('posts', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->text('body');
$table->timestamps();
});
And in your controller, you can handle CRUD operations. This approach is great for learning and for custom requirements.
2. Use a Laravel Blog Package
There are several Laravel packages that add blog functionality out of the box. Some popular ones:
- Canvas: A fully-featured blog package for Laravel.
- Wink: A modern, minimal CMS/blog for Laravel.
- Akaunting/Blog: Simple blog package.
These packages can save you time and provide admin panels, markdown support, tags, etc.
Example: Installing Canvas
composer require cnvs/canvas
php artisan canvas:install
3. Integrate with WordPress (If You Must)
If you really want the power of WordPress for blogging, you can run WordPress separately (even on a subdomain like blog.yoursite.com) and keep your main site in Laravel. You can also use the WordPress REST API to pull posts into your Laravel site if needed.
My Recommendation
Since your site is mostly custom and you want to use Laravel, building your own blog or using a Laravel package is usually the best way. It keeps your stack simple, your codebase unified, and you avoid the overhead of maintaining two separate systems.
If your blog needs are simple (just posts, maybe categories/tags, comments), building it yourself is a great learning experience and not much work. If you want more features quickly, try Canvas or Wink.
Summary Table:
| Option | Pros | Cons |
|---|---|---|
| Build your own | Full control, unified codebase | More initial setup |
| Laravel blog package | Quick setup, feature-rich | Less flexibility |
| Separate WordPress | Familiar, powerful blog features | Two systems to maintain |
Final Thought:
You don't need to reach for WordPress just because you want a blog. Laravel is more than capable, and there are great packages to help you get started quickly!
Let me know if you want a step-by-step guide for any of these options!