Hi, Lumen does not have this $app->any() method implemented.
You can create a Group like this.
$router->group(['prefix' => 'this-is-a-prefix'], function () use ($router) {
$controller = 'MyModelController@whateverMethod';
$router->get('/{route:.*}/', $controller);
$router->post('/{route:.*}/', $controller);
$router->put('/{route:.*}/', $controller);
$router->patch('/{route:.*}/', $controller);
$router->delete('/{route:.*}/', $controller);
});
This code will catch All methods for this url:
http:://your_lumen_implementation_url/this-is-a-prefix/whatever/comes/here/1
Where "whatever/comes/here/1" will be passed to the MyModelController@whateverMethod as a variable like this:
use Laravel\Lumen\Routing\Controller as BaseController;
class MyModelController extends BaseController
{
public function whateverMethod(Request $request, $route) {
// here $route will contain this value "whatever/comes/here/1"
// if you want to know what method was posted, use $request->method()
}
}