You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
}
Still what should be specified in repositoryClass in an entity ?
Interface implementation - (class DoctrineCurriculumBlockParamsRepository),
or interface - (interface CurriculumBlockParamsRepository) ?
The text was updated successfully, but these errors were encountered:
sindyko
changed the title
Cannot instantiate interface
[QUESTION] - Cannot instantiate interface
Feb 7, 2025
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:
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:
CurriculumBlockParamsRepository:
Still what should be specified in repositoryClass in an entity ?
Interface implementation - (class DoctrineCurriculumBlockParamsRepository),
or interface - (interface CurriculumBlockParamsRepository) ?
The text was updated successfully, but these errors were encountered: