eloquent-repository icon indicating copy to clipboard operation
eloquent-repository copied to clipboard

How I'm supposed to use the methods on base repository if they are all protected?

Open brunoflmg opened this issue 3 years ago • 0 comments

Will I have to duplicate the base methods with public access just to bridge it to the base method?

On the base repository:

    protected function find($id)
    {
        $this->resetQuery();
        $r = $this->model->find($id);
        $this->finishQuery();

        return $r;
    }

On the extended repository:

    public function find($id)
    {
        return parent::find($id);
    }

brunoflmg avatar Mar 11 '21 16:03 brunoflmg