Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

4.2. Security starter routes roles

EL OUFIR Hatim edited this page Feb 25, 2019 · 2 revisions

The routes provided by the package heloufir/security-starter are secured by the Roles middleware as well, you can find the specified roles in the config/security-starter.php configuration file.

<?php

return [

    // ...


    /*
    |--------------------------------------------------------------------------
    | Privileges
    |--------------------------------------------------------------------------
    |
    | This value represents the roles that the use must have to access
    | respectively the profiles and roles REST resources
    | >> Please refer to [https://github.com/heloufir/security-starter] to have
    | an idea on how to use this package
    |
    */
    'privileges' => [
        'profiles' => 'any,ROLE_PROFILES',
        'roles' => 'any,ROLE_ROLES'
    ]

];

You can customize this values by updating this file, then execute the command php artisan config:cache then execute php artisan route:list to check if the routes are secured by the new values that you entered.

Clone this wiki locally