<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
quantical-solutions / session-out-modal-laravel example snippets
// Add the ServiceProvider to the providers array in
// config/app.php
'providers' => [
'...',
'Quantic\SessionOut\SessionExpiredServiceProvider::class',
];
@
return [
// whether using broadcasting feature to make the modal disappear faster
'avail_broadcasting' => false,
];
// App\Listeners\SuccessfulLogin
use Quantic\SessionOut\Classes\AuthState;
/**
* Handle the event.
*
* @param Login $event
* @return void
*/
public function handle(Login $user)
{
AuthState::sessionAvailable();
}
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'/check-auth',
'/session',
'/rebirth-session'
];
}