PHP code example of tushar-arote / rediscope

1. Go to this page and download the library: Download tushar-arote/rediscope 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/ */

    

tushar-arote / rediscope example snippets


use Rediscope\Rediscope;

public function boot()
{
    Rediscope::auth(function ($request) {
        return auth()->check() && auth()->user()->isAdmin();
    });
}

Rediscope::auth(function ($request) {
    return auth()->check() && auth()->user()->hasRole('developer');
});
bash
php artisan vendor:publish --provider="Rediscope\RediscopeServiceProvider" --tag="rediscope-config"