Initial commit

This commit is contained in:
omair saleh
2020-05-11 14:43:49 +08:00
commit 4b1930b9ee
776 changed files with 266655 additions and 0 deletions
@@ -0,0 +1,24 @@
<?php
namespace App\Http\Middleware;
use Closure;
class CheckForAuthenticationToken
{
/**
* Checks if token exist.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if (session()->has('access_token') === false) {
return redirect()->route('login')->withErrors('Your session has expired. Please log in again.');
}
return $next($request);
}
}