/middleware-laravel-example

How to use Middleware in laravel for content restriction based on user role.

Primary LanguagePHP

Prerequisites

  • After cloning this repository, go to the root folder, run the following command/s,
        composer install
        composer update
  • Rename .env.example to .env and provide your database details there.
  • It needs a database table to store registered users. Run php artisan migrate to import the tables.
  • Run
    php artisan key:generate

Reference Post

https://justlaravel.com/middleware-laravel-content-restriction-user-role/

Demo and Code Explanation Video

https://www.youtube.com/watch?v=DkMmy-KRRTE&list=PLJKqSeQP_mlKUcBB8IC1LSWcIUYGldNuE

Working Demo

http://demos.justlaravel.com/middleware-laravel-content-restriction-user-role