Closed
Description
Hi, everyone. Please help me to solve a problem. If I use \LaravelDoctrine\ORM\ORM\Middleware\SubstituteBindings::class in App\Http\Kernel. And call it in Controller:
public function __invoke(CurriculumBlockParams $curriculumBlockParams)
{
return view('curriculum-blocks::admin.curriculum-block-params.edit', [
'curriculumBlockParam' => $curriculumBlockParams,
'curriculumBlockTypes' => $this->curriculumBlockTypeRepository->findAll()
]);
}
I'm getting an error:
Cannot instantiate interface Modules\CurriculumBlocks\Repositories\CurriculumBlockParams\CurriculumBlockParamsRepository
I try to follow the documentation and have essentially specified the interface reference as stated in the documentation. Or maybe I don't understand something
Entity:
#[ORM\Entity(repositoryClass: CurriculumBlockParamsRepository::class)]
#[ORM\Table(name: "curriculum_block_params")]
class CurriculumBlockParams
{
// code
}
CurriculumBlockParamsRepository:
interface CurriculumBlockParamsRepository
{
// code
}
Still what should be specified in repositoryClass in an entity ?
Interface implementation - (class DoctrineCurriculumBlockParamsRepository),
or interface - (interface CurriculumBlockParamsRepository) ?
Metadata
Metadata
Assignees
Labels
No labels