vanilophp / framework

The truly Laravel E-commerce Framework
https://vanilo.io
MIT License
810 stars 102 forks source link

Return value of Konekt\Concord\Proxies\ModelProxy::targetClass() must be of the type string, null returned #84

Closed victorighalo closed 4 years ago

victorighalo commented 4 years ago

I get this error when i use the role middleware in my routes:

Return value of Konekt\Concord\Proxies\ModelProxy::targetClass() must be of the type string, null returned

Route::group(['prefix' => 'office', 'middleware' => ['role:admin']], function (){

victorighalo commented 4 years ago

Solved this by updating config/concord.php

'modules' => [
        Vanilo\Framework\Providers\ModuleServiceProvider::class,
        Konekt\Acl\Providers\ModuleServiceProvider::class //<- add this,
    ]

But all these are not clearly spelt in the docs. So I had to do some digging through. Something seems to be missing somewhere. Initial setup should have all these config.

fulopattila122 commented 4 years ago

No, you need to add AppShell instead of Acl module, as stated here: https://vanilo.io/docs/1.2/installation#with-composer

victorighalo commented 4 years ago

No, you need to add AppShell instead of Acl module, as stated here: https://vanilo.io/docs/1.2/installation#with-composer

Thanks. I switched to AppShell