PHPackages                             m4tlch/laravel-blog - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. m4tlch/laravel-blog

ActiveLibrary[Admin Panels](/categories/admin)

m4tlch/laravel-blog
===================

Simple blog (with admin panel) for Laravel based on webdevetc/m4blog

v1.3.6(7y ago)016MITPHP

Since Jan 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/m4tlch/laravel-blog)[ Packagist](https://packagist.org/packages/m4tlch/laravel-blog)[ RSS](/packages/m4tlch-laravel-blog/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (7)Versions (9)Used By (0)

WebDevEtc M4Blog
================

[](#webdevetc-m4blog)

Easy to install Laravel Package for adding a full blog (with admin backend) to your Laravel app
-----------------------------------------------------------------------------------------------

[](#easy-to-install-laravel-package-for-adding-a-full-blog-with-admin-backend-to-your-laravel-app)

### 5 minutes to install! Quick and easy!

[](#5-minutes-to-install-quick-and-easy)

Introduction
------------

[](#introduction)

This is [WebDevEtc's](https://nikacrm.com/) M4Blog package. It has everything you need to quickly and easily add a blog to your laravel app.

FOR 5 MINUTE INSTALLATION GUIDE (with video guide), PLEASE VISIT [THE INSTALL GUIDE HERE](https://nikacrm.com/laravel/packages/m4blog-blog-system-for-your-laravel-app/help-documentation/laravel-blog-package-m4blog#install_guide)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#for-5-minute-installation-guide-with-video-guide-please-visit-the-install-guide-here)

[Install guide](https://nikacrm.com/laravel/packages/m4blog-blog-system-for-your-laravel-app/help-documentation/laravel-blog-package-m4blog#install_guide) • [Packagist](https://packagist.org/packages/webdevetc/m4blog) &lt;&lt; MAKE SURE YOU FOLLOW THE INSTURCTIONS. They're simple, but must be followed.

Features
--------

[](#features)

- Includes all views, routes, models, controllers, events, etc
    - Public facing pages:
        - View all posts (paginated)
        - View all posts in category (paginated)
        - View single post
        - Add comment views / confirmation views
        - Search (full text search), search form, search results page.
    - Admin pages:
        - Posts **(CRUD Blog Posts, Upload Featured Images (auto resizes)**
            - View all posts,
            - Create new post,
            - Edit post,
            - Delete post
        - Categories **(CRUD Post Categories)**
            - View all categories,
            - Create new category,
            - Edit post,
            - Delete post
        - Comments **(including comment approvals)**
            - View all comments,
            - Approve/Moderate comment,
            - Delete comment
        - Upload images
            - as well as uploading featured images for each blog post (and auto resizing to multiple defined sizes), you can upload images separately.
            - view all uploaded images (in multiple sizes)
- **Includes admin panel**
    - Create / edit posts
    - Create / edit post categories
    - Manage (approve/delete) submitted comments
- Allows each blog post to have featured images uploaded (you can define the actual dimensions) - in large, medium, thumbnail sizes
- fully configurable via its `config/m4blog.php` config file.
- **Includes all required view files, works straight away with no additional setup.** All view files (Blade files) use Bootstrap 4, and very clean HTML (easy to get your head around). You can easily override any view file by putting files in your `/resources/views/vendor/m4blog/` directory
- **Built in comments (using the database)**, can auto approve or require admin approval (comment moderation).
    - Other options include using [Disqus](http://disqus.com/) comments or disabling comments.
- Includes unit tests.
- Fires events for any database changes, so you can easily add Event Listeners if you need to add additional logic.
- **&lt; 5 minute install time** and your blog is up and working, ready for you to go to the admin panel and write a blog post - see full details below, but this is a summary of the required steps:
    - install with composer,
    - do the database migration, copy the config file over (done with `php artisan vendor:publish`)
    - chmod/chown the `public/blog_images/` directory so featured images can be uploaded for each blog post
    - and then add 1 method to your `\App\User` file (`canManageM4BlogPosts()`
    - **but please see the install instructions to get everything up and working**

What/who this package is for:
-----------------------------

[](#whatwho-this-package-is-for)

- For websites running Laravel (5.6)
- Who want to have a site blog, and have an easy to use interface to write blog posts/assign categories/manage existing posts
- Where only admin users can edit/manage the blog (this is not suitable for every user on your site to be able to manage posts)
- Where you understand that posts can (potentially) contain JS or any other code, so you should only allow trusted admin users to add/edit/delete/manage the blog posts

What this package is NOT for:
-----------------------------

[](#what-this-package-is-not-for)

- Sites where you want your (normal, non-admin) users to write blog posts. You must set `canManageM4BlogPosts()` on your user model to ONLY allow trusted users.

Important notes
---------------

[](#important-notes)

1. Anyone who can manage blog posts (defined by the `canManageM4BlogPosts()` method you add to your User model) can submit any HTML which is echoed out. This is a security issue. If you don't trust the content you should add a custom view and escape the blog content before echoing it, and set `use_custom_view_files` in the config to false.
2. if `use_custom_view_files` is enabled in the config (which it is by default), it means that any post with a custom view file set (details in the docs) can include any file within `/resources/views/custom_blog_posts`, which blade will execute. This package gives no method to edit any file within that directory though.

How to install M4Blog to your laravel app
-----------------------------------------

[](#how-to-install-m4blog-to-your-laravel-app)

Please see our [M4Blog Laravel Blog Package Documentation/install guide](https://nikacrm.com/laravel/packages/m4blog-blog-system-for-your-laravel-app/help-documentation/laravel-blog-package-m4blog#install_guide) for install instructions. (It is very simple - done via composer/artisan commands, plus adding one method to your \\App\\User model (`canManageM4BlogPosts()` which should return `true` if this user can manage the blog).

How to customise the blog views/templates
-----------------------------------------

[](#how-to-customise-the-blog-viewstemplates)

This is easy to do, and further detail can be found in our [M4Blog Laravel Blog Package Documentation](https://nikacrm.com/laravel/packages/m4blog-blog-system-for-your-laravel-app/help-documentation/laravel-blog-package-m4blog#guide_to_views).

After doing the correct `vendor:publish`, all of the default template files will be found in /resources/views/vendor/m4blog/ and are easy to edit to match your needs.

Routes
------

[](#routes)

It will auto set all required routes (both public facing, and admin backend). There are some config options (such as changing the /blog/ url to something else), which can be done in the m4blog.php file.

Config options
--------------

[](#config-options)

Please see the [M4Blog config option documentation here](https://nikacrm.com/laravel/packages/m4blog-blog-system-for-your-laravel-app/help-documentation/laravel-blog-package-m4blog#config_options) for details.

All config options have comments which describe what they do. Please just refer to the `m4blog.php` file in your /config/ dir.

Events
------

[](#events)

You can find all the events that are fired by looking in the `/src/Events` directory.

Add these (and an Event Listener) to your `EventServiceProvider.php` file to make use of these events when they fire.

Built in CAPTCHA / anti spam
----------------------------

[](#built-in-captcha--anti-spam)

There is a built in captcha (anti spam comment) system built in, which will be easy for you to replace with your own implementation.

Please see [our Captcha docs](https://nikacrm.com/laravel/packages/m4blog-blog-system-for-your-laravel-app/help-documentation/laravel-blog-package-m4blog#captcha) for more details.

TODO
----

[](#todo)

This is a list of features or things that I want to eventually get round to adding

- Better UI for uploading images/viewing uploaded images
- Link uploaded images to blog post. At the moment they are not related.
- Allow users to remove a featured image from a blog post.
- Option to use HTMLPurifier to sanatise output.
- Better options for assigning post authors (currently it just assigns the currently logged in user). However, if site has 10,000+ users do we really want an UI interface for this? The alternative is to add something like a a is\_admin field to the `users` table and only show admin users.
- Possibly add tags (we already have categories) but I am not sure how useful they really are, given that we already have categories.
- Pagination for comments on view single post? At the moment we limit it to a high number (default in config is 5000).
- RSS feed: shows from full (stripped tags) -&gt;html of blog post (although has a setTextLimit() on it) - need to trim this, and if it uses custom view files then it should render that (without html).
- Email notification to admin when new comment is added
- RSS to use generate\_introduction() for its contents.

Recent changes:
---------------

[](#recent-changes)

1. Added full text search and search views. You have to enable it in the config file (see latest config file)
2. Need more than the 3 default image sizes? Add more in the config/m4blog.php file, add the database column for it and it'll work!

Having problems, something is not working?
------------------------------------------

[](#having-problems-something-is-not-working)

*Image upload errors?*

Try adding this to config/app.php:

```
'Image' => Intervention\Image\Facades\Image::class

```

- Also make sure that /tmp is writable. If you have open\_basedir enabled, be sure to add :/tmp to its value.
- Ensure that /public/blog\_images (or whatever directory you set it to in the config) is writable by the server
- You might need to set a higher memory limit, or upload smaller image files. This will depend on your server. I've used it to upload huge (10mb+) jpg images without problem, once the server was set up correctly to handle larger file uploads.

Version History
---------------

[](#version-history)

- 3.1 - minor fixes
- 3.0.3 - fixed RSS feed cache issue
- 3.0.2 - fixed default medium image size (changed to 600x400)
- 3.0.1 - replaced all short tags (&lt;?) with full opening ones (&lt;?php)
- 3.0 - Added separate functionality for uploading images (and save some meta data in db)
- 2.1 - added 'short\_description' to db + form, and M4BlogPost::generate\_introduction() method will try and use this to generate intro text.
- 2.0 - added full text search (enable it via the config file - it is disabled by default).
- 1.2 - added WYSIWYG, few smaller changes
- 1.1.1 - added basic captcha
- 1.0.5 - composer.json changes.
- 1.0 - First release
- 0.3 - Small changes, packagist settings.
- 0.1 - Initial release

Issues, support, bug reports, security issues
---------------------------------------------

[](#issues-support-bug-reports-security-issues)

Please contact me on the contact from on [WebDev Etc](https://nikacrm.com/) or on [twitter](https://twitter.com/web_dev_etc/) and I'll get back to you asap.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

8

Last Release

2676d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/85ad6bebc9c3d3818cad66ae54b674879c3bf22e2791a0191c8c3bc7b1f1f0f2?d=identicon)[m4tlch](/maintainers/m4tlch)

---

Top Contributors

[![m4tlch](https://avatars.githubusercontent.com/u/3687188?v=4)](https://github.com/m4tlch "m4tlch (10 commits)")

---

Tags

laravelpackagefeedrsswriteblogadmin newspostsupdatepanel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/m4tlch-laravel-blog/health.svg)

```
[![Health](https://phpackages.com/badges/m4tlch-laravel-blog/health.svg)](https://phpackages.com/packages/m4tlch-laravel-blog)
```

###  Alternatives

[binshops/laravel-blog

Simple blog package (with admin panel) for Laravel. Includes all views, controllers, routes and can add a blog to any existing Laravel app. Fully customisable blog (view, urls, and many other options). Includes image uploads and a pretty admin interface to manage your blog. Defaults to /blog but you can change it to anything.

48447.0k](/packages/binshops-laravel-blog)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
