vanilophp / product

Product Module for Vanilo (or any Laravel app)
https://vanilo.io
MIT License
18 stars 8 forks source link

Class App\Product must extend or implement Vanilo\Category\Contracts\Taxon. #13

Closed victorighalo closed 4 years ago

victorighalo commented 4 years ago

I get this exception when i create a custom model for both Taxon and Product:

Class App\Product must extend or implement Vanilo\Category\Contracts\Taxon.

When i implement Taxon, then i'm forced to also add the method definitions of the Taxon interface.

fulopattila122 commented 4 years ago

Product must obviously not implement the Taxon interface. How do you set up the custom models?

victorighalo commented 4 years ago

Product must obviously not implement the Taxon interface. How do you set up the custom models?

        $this->app->concord->registerModel(TaxonContract::class, \App\Product::class);
        $this->app->concord->registerModel(TaxonContract::class, \App\Taxon::class);
fulopattila122 commented 4 years ago

Do I have to explain? :)

$this->app->concord->registerModel(ProductContract::class, \App\Product::class);
$this->app->concord->registerModel(TaxonContract::class, \App\Taxon::class);