They are two completely different subjects.
Routes, take a url and map it to some functionality (a controller).
Requests are the data sent along with a request to a url.
So what is the difference here ?
if (Request::is('admin/*'))
{
//
}
Route::filter('admin', function()
{
//
});
Route::when('admin/*', 'admin');
Think of
if (Request::is('admin/*'))
{
//
}
as
if ( << Route where the request landed >> ::is('admin/*'))
{
//
}
Does it make more sense?? ;)
ughhh :)
thx guys, but hahaha, not really.
i can check current route , so i dont really need to check request.
its making the same in 2 different ways ?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community