first commit, after modifying client section

This commit is contained in:
Kwesi Banson
2023-02-22 07:48:50 +00:00
commit ad0dd6a6e1
1880 changed files with 538494 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Http\Middleware;
use Closure;
class CheckLogin
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if(!$request->session()->has('current_user')){
return redirect(url('login'))->withErrors("You need to be logged in");
}
return $next($request);
}
}