Routes file redirect

Published 1 year ago by jrock2004

I am trying to figure out in the routes file how I can redirect based based off an if statement

// Auth Routes

if (!env('ALLOW_REGISTRATION', false)) {
    Route::any('/register', function() {

// Home Controller
Route::get('/', '[email protected]');

Right now what happens is I get a blank page. Maybe I should just 404 since I am trying to hide that route?


Mods, please delete. I forgot to add return in front of redirect

Please sign in or create an account to participate in this conversation.