I am using Laravel 4. I would like to access the current URL inside an @if condition in a view using the Laravel\'s Blade templating engine but I don\'t know ho
@if
You can also use Route::current()->getName() to check your route name.
Route::current()->getName()
Example: routes.php
Route::get('test', ['as'=>'testing', function() { return View::make('test'); }]);
View:
@if(Route::current()->getName() == 'testing') Hello This is testing @endif