PHPackages                             rnkpatel/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. [Framework](/categories/framework)
4. /
5. rnkpatel/laravel-blog

ActiveLibrary[Framework](/categories/framework)

rnkpatel/laravel-blog
=====================

laravel blog app

030PHP

Since Jun 16Pushed 10y ago1 watchersCompare

[ Source](https://github.com/rnkpatel/laravel-blog)[ Packagist](https://packagist.org/packages/rnkpatel/laravel-blog)[ RSS](/packages/rnkpatel-laravel-blog/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-blog
============

[](#laravel-blog)

A simple Blog Module for Laravel 5

Features
--------

[](#features)

- Create/update/delete posts.
- Add different category of blog. Create blog in different category.
- Bundled migration for building the database schema
- Facebook API integration. Share/Like on Facebook.
- Twitter API integration. Share on Twitter.
- Google+ API integration. Share on Google+.
- Infinite ajax scroller. No need to click on next page.
- You can customise it as per your requirements.

Installation
------------

[](#installation)

1. Create a file called `module.php` inside the `config` directory. Add following code in module.php.

    ```
     return  [
         'modules' => [
            'Blog',
         ]
     ];
    ```

    You can add more then one modules inside `modules` array.

    ```
2. Open up the file `config/app.php` and add `'App\Modules\ModulesServiceProvider',` to the end of the providers array.

    ```
    'providers' => [
        App\Modules\ModulesServiceProvider::class,
    ]

    ```
3. Create new folder called `Modules` inside app directory.
4. Add `Blog` folder inside Modules directory. App directory structure look like this:

    ```
       app/
       |---Modules
           |---Blog
               |---Assets
               |---Components
               |---Controllers
               |---Middleware
               |---Migrations
               |---Models
               |---Views
               |---BlogServiceProvider.php
               |---routes.php
           |---ModulesServiceProvider.php

    ```
5. Head to the Modules directory and add a file called `ModulesServiceProvider.php`
6. Run Migrations. For that use following command.

    ```
     $ php artisan migrate --path app/Modules/Blog/Migrations

    ```

    (Role column will be added into your users table. That will be define which user has author/admin role. You can change table name as per your requirement.)
7. Add following methods into app/User.php

    ```
     /**
      * user has many posts
      * @return type
      */
     public function posts()
     {
         return $this->hasMany('App\Modules\Blog\Models\Posts', 'author_id');
     }

     /**
      * user has many comments
      * @return type
      */
     public function comments()
     {
         return $this->hasMany('App\Modules\Blog\Models\Comments', 'from_user');
     }

     /**
      * Check if user can post blog
      * @return boolean
      */
     public function can_post()
     {
         $role = $this->role;
         if ($role == 'author' || $role == 'admin') {
             return true;
         }
         return false;
     }

     /**
      * Check if user is admin
      * @return boolean
      */
     public function is_admin()
     {
         $role = $this->role;
         if ($role == 'admin') {
             return true;
         }
         return false;
     }

    ```
8. To set facebook API key open up Blog/Views/layouts/app.blade.php and set

    ```
     appId      : 'your app id',

    ```

    in line number 8.
9. To get twitter count register your domain on any APIs which providers twitter count. Open up Blog/Views/posts/show.blade.php and set Provided path to

    ```
     data-via : 'Your domain path'

    ```

    in line number 187.
10. For Routes you can add/update in Blog/routes.php (Blog module has its own routes.php so you can add/update routes here.)
11. Please run `composer dump-autoload`, if you come across any Class not found exceptions and you haven’t done anything wrong

#### Note:

[](#note)

This module is tested in fresh copy of laravel 5. If you have customised your application then please change as per your application.

Demo
----

[](#demo)

Discussion
----------

[](#discussion)

Credit
------

[](#credit)

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.6% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19950792?v=4)[rnkpatel](/maintainers/rnkpatel)[@rnkpatel](https://github.com/rnkpatel)

---

Top Contributors

[![rnkpatel](https://avatars.githubusercontent.com/u/19950792?v=4)](https://github.com/rnkpatel "rnkpatel (28 commits)")[![knshah2010](https://avatars.githubusercontent.com/u/13073963?v=4)](https://github.com/knshah2010 "knshah2010 (1 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M844](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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