PHP code example of usmonaliyev / laravel-redis-auth

1. Go to this page and download the library: Download usmonaliyev/laravel-redis-auth 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/ */

    

usmonaliyev / laravel-redis-auth example snippets

bash
php artisan vendor:publish --provider="Usmonaliyev\LaravelRedisAuth\RedisAuthServiceProvider"
bash
Auth::user()->check('users.add', "If you want to change error message!");

OR

auth()->user()->check('messages.show');
bash
Route::middleware('redis-auth')->group(function () {
    // Protected routes
});