How to get the current URL inside @if statement (blade) in Laravel 4?-open source projects laravel/laravel
Naing Win
You can also use Route::current()->getName()
to check your route name.
Example: routes.php
Route::get('test', ['as'=>'testing', function() {
return View::make('test');
}]);
View:
@if(Route::current()->getName() == 'testing')
Hello This is testing
@endif