Skip to content

Zainulabdin-burfat/custom-rbac

Repository files navigation

Laravel 8 - Role Based Access Control

Custom Route Wise Access Control

2 Authorization layers, the one is using Gates and Policies, and the second is using custom command route wise using route name eg: (post.index, post.create)

Prerequisites

  • Laravel 8
  • php = 7.3|7.4
  • Commands

    composer install
    composer require laravel/breeze:1.9.2
    php artisan breeze:install
    npm install && npm run dev
    php artisan vendor:publish then insert 0 and Enter
    php artisan migrate
    php artisan db:seed
    php artisan create:permission

    Permissions are created dynamically through command according to the controllers having methods

    Admin login credentials

  • [email protected]
  • password=password