This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

registration2258
registration2258

I am struggling.

I am try to bind my interface held in my plugins folder to its correct implementation class stored in same folder.

But having no luck.

 public function register()
    {
        $this->app->bind(
            'plugins\SideKick\Property\Repositories\PropertyRepositoryInterface',
            function($app) {

                return new myClass()

            }
        );

Last updated

sounobre52783
sounobre52783

Has anyone managed to solve this?

daftspunky
daftspunky

I think you want something like this

$this->app->bind(
    SideKick\Property\Repositories\PropertyRepositoryInterface::class,
    function($app) {
        return new MyClass();
    }
);

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.