Hey Guys,
Can anyone explain why the following throws the error:
Cannot register two routes matching “/api/public/forumthread/([^/]+)” for method “PUT”
$app->group(’/api/public/forumthread’, function () {
$this->put(’/{id}’, function ($request, $response, $args) {
$model = ForumThread::find($args[‘id’]);
$data = $request->getParsedBody();
$model->fill($data);
$model->save();
return $response->withJson($model->toArray());
});
});
It worked in Slim 2.
Cheers,
sn0rcha