PHP code example of milhouse1337 / cogul

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

    

milhouse1337 / cogul example snippets


return [
    'token'      => env('COGUL_TOKEN', ''),
    'url'        => env('COGUL_URL', '/auth/token/{token}'),
    'redirect'   => env('COGUL_REDIRECT', '/'),
    'cookie'     => env('COGUL_COOKIE', 'cogul'),
    'expiration' => env('COGUL_EXPIRATION', 2628000), // 5 years.
    'middleware' => env('COGUL_MIDDLEWARE', 'web'),
    'whitelist'  => [],
];

Route::get('example', 'Controller@example')->middleware('auth.cogul');
bash
php artisan vendor:publish --provider="Milhouse1337\Cogul\CogulServiceProvider"