Файловый менеджер - Редактировать - /home/clickysoft/public_html/app/Http/Middleware/IncludeOrganizationId.php
Назад
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Http\Request; use Symfony\Component\HttpFoundation\Response; use Illuminate\Support\Facades\Auth; class IncludeOrganizationId { /** * Handle an incoming request. * * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next */ public function handle(Request $request, Closure $next): Response { // Get the authenticated user $user = Auth::user(); // Check if the user is authenticated and has an organization_id if ($user && $user->organization_id) { // Add organization_id to the request $request->merge(['organization_id' => $user->organization_id]); } return $next($request); } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка