According to the Flight PHP documentation, to use an object method is by using:
Flight::route('/some/route', [$object, 'method']);
and to use route parameters is by using:
Flight::route('/@name/@id', function($name, $id){
echo "hello, $name ($id)!";
});
I tried to combine both like this:
Flight::route('/user/@id', [$object, 'method']);
but it doesn't work. Is there any way to pass parameters to an object method?