init project

This commit is contained in:
2026-05-25 11:08:52 +07:00
parent a388c619b5
commit 895fdd9b83
1437 changed files with 384844 additions and 27 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace App\Http\Middleware;
//use Illuminate\Auth\Middleware\Authenticate as Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
class VerifyBaseLab
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @param Closure $next
* @return string|null
*/
public function handle(Request $request, Closure $next)
{
try{
if (!$request->session()->exists('base_lab_id')) {
return redirect('/base');
}
} catch (\Exception $e){
Log::error($e);
}
return $next($request);
}
}