staudenmeir / eloquent-has-many-deep

Laravel Eloquent HasManyThrough relationships with unlimited levels
MIT License
2.67k stars 157 forks source link

CompositeKey not included when installed. #225

Closed webdevomandam closed 9 months ago

webdevomandam commented 9 months ago

Failed to read the CompositeKey when using the use Staudenmeir\EloquentHasManyDeep\Eloquent\CompositeKey;. Also tried to check the vendor\staudemeir\eloquent-has-many-deep\src and no eloquent* files were found.

Installed the package with this command composer require staudenmeir/eloquent-has-many-deep:"^1.7" and currently using laravel 6.

staudenmeir commented 9 months ago

Hi @webdevomandam, Composite keys are only supported with Laravel 9+. I'll add that to the README.

webdevomandam commented 9 months ago

Ah I see. Thanks for the clarification. So, what can be the alternative for CompositeKey? Will array() be okay?

staudenmeir commented 9 months ago

There is no alternative, you can only use this feature after upgrading to Laravel 9+.