You can assign aliases to each route, so that you can identify the current route name despite the query strings. For example:
Route::get('/content', array('uses'=>'ContentController@index', 'as'=>'content'))
Route::post('/dynamic/{dynamic}', array('uses'=>'DynamicController@store', 'as'=>'dynamic.show'))
Route::delete('dynamic/{dynamic}/content/{content}', array('uses'=>'ContentController@destroy', 'as'=>'dynamic.destroy'))
Now in a filter, you can do the following:
$allowedRoutes = array('content');
$currentRoute = Route::currentRouteName();
if (in_array($currentRoute, $allowedRoutes)) {
// do action1
} else {
// do action2
}
Note that this filter needs to be an after
filter, not a before
filter.