NCORE_Smart_Firewall/routes/web.php

20 lines
510 B
PHP

<?php
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return redirect('cp');
});
Route::Group(['prefix' => 'cp', 'middleware' => 'web'], function () {
Route::get('/', function (\Illuminate\Http\Request $request) {
if (!Auth::check()) {
return redirect('auth');
} else {
return redirect('dashboard');
}
});
Route::get('auth',[\App\Http\Controllers\SmartController::class, 'index']);
});