Goal: Use Subdomain as a param and a unlimited amount of GET Params in "normal .. ?param=style" and "/param/style".
Current "web.php"
Route::group(array('domain' => "{bucketIdentifier}.$domainToUse"), function () {
Route::get('/{bucketIdentifier?}', 'BucketController@receive');
Route::post('/{bucketIdentifier?}', 'BucketController@receive');
Route::put('/{bucketIdentifier?}', 'BucketController@receive');
Route::delete('/{bucketIdentifier?}', 'BucketController@receive');
Route::patch('/{bucketIdentifier?}', 'BucketController@receive');
});
If you send a request to xyz.mydomain.com, i get the bucketIdentifier to query the DB. Works as designed.
If you send a GET Request with "?myparam=12&other=42" i can get the Param, works like designed.
But how can i also use "/myparam/12/other/42" for routed. With this setup i will get 404 as response.
Other aporoach (does not work)
Route::group(array('domain' => "{bucketIdentifier}.$domainToUse"), function () {
Route::get('/{query}', 'BucketController@receive')->where('query','.+');
Route::post('/{query}', 'BucketController@receive')->where('query','.+');
Route::put('/{query}', 'BucketController@receive')->where('query','.+');
Route::delete('/{query}', 'BucketController@receive')->where('query','.+');
Route::patch('/{query}', 'BucketController@receive')->where('query','.+');
});
Now i have the bucketIdentifier als "query" param (;