This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccount/app/Http/Middleware/View.php

25 lines
501 B
PHP
Raw Normal View History

2019-04-24 18:46:41 +00:00
<?php
namespace App\Http\Middleware;
use App\Models\Setting;
use Closure;
use Illuminate\Support\Facades\Auth;
class View
{
/**
* 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());
view()->share('settingsArray', Setting::getSettingsAsArray());
return $next($request);
}
}