<?php  namespace App\Http;  use Spatie\Csp\AddCspHeaders; use App\Http\Middleware\TrimStrings; use App\Http\Middleware\Authenticate; use App\Http\Middleware\ChangeLocale; use App\Http\Middleware\TrustProxies; use App\Http\Middleware\EncryptCookies; use App\Http\Middleware\VerifyCsrfToken; use Illuminate\Auth\Middleware\Authorize; use App\Http\Middleware\ValidateSignature; use Illuminate\Http\Middleware\HandleCors; use App\Http\Middleware\RecordReadActivity; use App\Http\Middleware\RestrictByUserType; use App\Http\Middleware\CheckRolePermissions; use Illuminate\Auth\Middleware\RequirePassword; use Illuminate\Http\Middleware\SetCacheHeaders; use Illuminate\Session\Middleware\StartSession; use App\Http\Middleware\RedirectIfAuthenticated; use Illuminate\Routing\Middleware\ThrottleRequests; use Illuminate\Foundation\Http\Kernel as HttpKernel; use Illuminate\Auth\Middleware\EnsureEmailIsVerified; use Illuminate\Routing\Middleware\SubstituteBindings; use Illuminate\Session\Middleware\AuthenticateSession; use Illuminate\View\Middleware\ShareErrorsFromSession; use App\Http\Middleware\PreventRequestsDuringMaintenance; use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth; use Illuminate\Foundation\Http\Middleware\ValidatePostSize; use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse; use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull; use Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests;  class Kernel extends HttpKernel { 	/** 	 * The application's global HTTP middleware stack. 	 * 	 * These middleware are run during every request to your application. 	 */ 	protected $middleware = [ 		// \App\Http\Middleware\TrustHosts::class, 		TrustProxies::class, 		HandleCors::class, 		PreventRequestsDuringMaintenance::class, 		ValidatePostSize::class, 		TrimStrings::class, 		ConvertEmptyStringsToNull::class, 	];  	/** 	 * The application's route middleware groups. 	 */ 	protected $middlewareGroups = [ 		'web' => [ 			EncryptCookies::class, 			AddQueuedCookiesToResponse::class, 			StartSession::class, 			AuthenticateSession::class, 			ShareErrorsFromSession::class, 			VerifyCsrfToken::class, 			SubstituteBindings::class, 			AddCspHeaders::class, 		],  		'api' => [ 			ThrottleRequests::class . ':api', 			SubstituteBindings::class, 		], 	];  	/** 	 * The application's middleware aliases. 	 * 	 * Aliases may be used to conveniently assign middleware to routes and groups. 	 */ 	protected $middlewareAliases = [ 		'auth' => Authenticate::class, 		'auth.basic' => AuthenticateWithBasicAuth::class, 		'cache.headers' => SetCacheHeaders::class, 		'can' => Authorize::class, 		'guest' => RedirectIfAuthenticated::class, 		'password.confirm' => RequirePassword::class, 		'precognitive' => HandlePrecognitiveRequests::class, 		'signed' => ValidateSignature::class, 		'throttle' => ThrottleRequests::class, 		'verified' => EnsureEmailIsVerified::class, 		'check_role_permissions' => CheckRolePermissions::class, 		'change_locale' => ChangeLocale::class, 		'record_read_activity' => RecordReadActivity::class, 		'restrict_by_user_type' => RestrictByUserType::class, 	]; }