W
W
WebSpider2014-10-01 17:29:50
Laravel
WebSpider, 2014-10-01 17:29:50

How does routing work in Laravel?

Good afternoon.
Can you please tell me whether it is possible to do the following things in Laravel routing (version 5 or 4 is desirable):
1. Skip the route depending on the conditions. For example something like this

Route::get('{route}', function() {
  // переходим к следующему роуту
  return false;
});

2. Map the routing to the controller (as, for example, in Yii)
Route::get('user/{action}', '[email protected]{action}');

Or is it really necessary to write a bunch of routes by hand?
Thanks in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WebSpider, 2014-10-01
@WebSpider

Thank you all for your participation. Especially @ssenkevich and @AmdY
Partial solution of the problem is in their comments ( 1 ) ( 2 ) ( 3 )

S
Sergey Melnikov, 2014-10-01
@mlnkv

I think there is enough information here not to ask such questions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question