This repository was archived by the owner on Jun 4, 2024. It is now read-only.
generated base controller wrong namespace in findModel #147
Open
Description
Hi, I have looked online and in the docs, cant see this issue. When I generate with ./yii gii/api --openApiPath=http://localhost:3000/documentation/json
My base classes all have a broken findModel method. I am getting
public function findModel($id)
{
$model = \::findOne($id);
if ($model !== null) {
return $model;
}
throw new \yii\web\NotFoundHttpException("Object not found: $id");
}
where I would be expecting say \common\models\Company::findOne($id).
I assume some config isn't set right, but I'm blowed if i can see how.
Metadata
Metadata
Assignees
Labels
No labels