How to build a Laravel route that requires a specific URL query parameter?
Let's say I have URLs like this: localhost/ admin/users/ <--- Main Admin Users page localhost/ admin/users/?data=refresh <---- A typical ajax request made from that page And a simple controller like this: class UsersController extends Controller { public function index() // call some services // return a view } public function dataRefresh { // call some services // return some JSON } } And here's my routes.php I'm working on: Route::get('admin/users', array('as' => 'admin.users', 'uses' => 'Admin\Users\UsersController@index')); Route::get('admin/users????' , array('before' => 'ajax', 'as' =>