Optimise the setting of our configuration via Setup::class, optimise the calculation of our_addresses()
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Http\Middleware;
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\Auth\Authenticatable;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
|
||||
use App\Models\Setup;
|
||||
|
||||
@@ -45,8 +46,10 @@ class AddUserToView
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
Config::set('setup',$x=Setup::find(config('app.id'))->load('system'));
|
||||
|
||||
$this->factory->share('user',$this->user);
|
||||
$this->factory->share('setup',Setup::find(config('app.id')));
|
||||
$this->factory->share('setup',$x);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
Reference in New Issue
Block a user