phpldapadmin/app/Http/Middleware/GuestUser.php
Deon George 2ccc1d3b83 Framework update and updates from other projects,remove leenooks/laravel
Framework updates, and hack to get CI testing working
2021-12-11 00:24:00 +11:00

27 lines
478 B
PHP

<?php
namespace App\Http\Middleware;
use App\Ldap\User;
use Closure;
/**
* Class GuestUser
* @package Leenooks\Laravel\Http\Middleware
*/
class GuestUser
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request,Closure $next)
{
view()->share('user', auth()->user() ?: new User);
return $next($request);
}
}