22 lines
417 B
PHP
22 lines
417 B
PHP
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use Closure;
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
class oAuthMiddelware
|
|
{
|
|
/**
|
|
* 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());
|
|
return $next($request);
|
|
}
|
|
}
|