O
O
Oleg2016-10-20 17:19:04
Laravel
Oleg, 2016-10-20 17:19:04

Laravel, IF, ELSE in Routing files?

Is it good practice in Laravel to use IF, ELSE in Routing files?
For example:
Route::group([ bla... bla...
if (Check)
Route::get(....
else
Route::get(...
});
Or use it according to other application logic?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2016-10-20
@trimba

middleware
up
router can process subdomains
https://laravel.com/docs/5.1/routing#route-group-s...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question