Currently in my routes.php file I've got the following:
Route::get('import', 'Controller@import');
But as for the requests they'd be sent in the following way:
/import?flag=0&data={} //flag could be anything from 0-4 & data is json encoded info
/import?flag=5&data={}
/import?flag=6&data={}
These are the only 3 requests that I'd have, I'm aware that Laravel supports where
method on the route but only regular expressions but not on query parameters, is there a solution for this that I'm overlooking?
The expression method would be something like so:
Route::get('import?flag={id}&data={data}', 'Controller@importFlag0-4')->where('id', '<=', '4');
Route::get('import?flag={id}&data={data}', 'Controller@importFlag5')->where('id', '5');
Route::get('import?flag={id}&data={data}', 'Controller@importFlag6')->where('id', '6');