phpldapadmin/app/Http/Middleware/ApplicationSession.php
Deon George db4b90183f
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 37s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m23s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 3m29s
Create Docker Image / Final Docker Image Manifest (push) Successful in 11s
Fix excess memory being used when building schema
2025-01-13 22:03:47 +11:00

32 lines
594 B
PHP

<?php
namespace App\Http\Middleware;
use Closure;
use Config;
use Illuminate\Http\Request;
use App\Classes\LDAP\Server;
use App\Ldap\User;
/**
* This sets up our application session with any required values, ultimately for cache optimisation reasons
*/
class ApplicationSession
{
/**
* Handle an incoming request.
*
* @param Request $request
* @param Closure $next
* @return mixed
*/
public function handle(Request $request,Closure $next): mixed
{
Config::set('server',new Server);
view()->share('user', auth()->user() ?: new User);
return $next($request);
}
}