Refactor root redirect logic to simplify default behavior
This commit is contained in:
@@ -6,17 +6,8 @@ use App\Models\Plant;
|
|||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
// Route::get('/', function () {
|
|
||||||
// return redirect('/admin');
|
|
||||||
// });
|
|
||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
$host = request()->getHost();
|
return redirect('/admin');
|
||||||
|
|
||||||
if ($host == 'pds.iotsignin.com') {
|
|
||||||
return redirect()->away('https://pds1.iotsignin.com/');
|
|
||||||
}
|
|
||||||
|
|
||||||
return redirect('/admin'); // default redirect
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Route::get('/scheduler', function() {
|
// Route::get('/scheduler', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user