PHP code example of curly-deni / laravel-permission-policy

1. Go to this page and download the library: Download curly-deni/laravel-permission-policy library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

curly-deni / laravel-permission-policy example snippets


return [

    'register_gate' => true, // Automatically register default gate with policy bindings

    // Toggle specific permission checks:
    'read_check' => false,   // Use 'read' instead of 'view'
    'view_check' => true,    // Check for 'view' permission
    'create_check' => true,  // Check for 'create' permission
    'update_check' => true,  // Check for 'update' permission
    'delete_check' => true,  // Check for 'delete' permission
];
bash
php artisan vendor:publish --tag="permission-policy-config"