Laravel environment

From AWVVO
Jump to navigationJump to search

Get environment

App::environment();

enable routes in development mode only

// Conditional /test Route
if (! App::environment('production')) {
    Route::get('/test', [TestController::class, 'index']);
}