first commit

This commit is contained in:
kizzroyal
2022-02-16 14:01:00 +07:00
commit f876f79060
294 changed files with 92083 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Http\Middleware;
use App\Http\Repositories\AttendanceSessionRepository;
use Closure;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class MaintenanceSystem extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @return string|null
*/
public function handle($request, Closure $next)
{
$repo = new AttendanceSessionRepository();
$config = $repo->getSettingWebsite();
if ($config['baotri'] == 1){
return redirect(route('bao_tri'));
}
return $next($request);
}
}