rinvex / laravel-attributes

⚠️ [ABANDONED] Rinvex Attributable is a robust, intelligent, and integrated Entity-Attribute-Value model (EAV) implementation for Laravel Eloquent, with powerful underlying for managing entity attributes implicitly as relations with ease. It utilizes the power of Laravel Eloquent, with smooth and seamless integration.
MIT License
434 stars 104 forks source link

Upgrade to v0.0.6 from v0.0.4: "Class name must be a valid object or a string" #61

Closed dhildreth closed 6 years ago

dhildreth commented 6 years ago

I'm getting this error I can't seem to shake after upgrading from v0.0.4 to v0.0.6 on Laravel 5.6. It happens when I attempt to load an entity using $product = App\Product::find(1);. This happens using php artisan tinker as well as in the browser.

Class name must be a valid object or a string

Stack trace isn't very helpful to me:

1 Symfony\Component\Debug\Exception\FatalThrowableError 
…/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php656
0 {main}
…/public/index.php0

I've attempted to use the following commands and try again, but the error is persistent:

php artisan cache:clear
php artisan clear-compiled
composer dump-autoload

In the meantime, I'm downgrading to v0.0.4. Any help would be appreciated.

dhildreth commented 6 years ago

Okay, I missed the update on the core attribute types now being part of implementation. (https://github.com/rinvex/attributes/commit/e0d16825d613ed3cdb67ff6953bc3a4185c6536e#diff-ea0d11a7ac5ac10f344772d0863e113d and in README). After adding these to my AppServiceProvider.php everything appears to be working okay in v0.0.6.