outl1ne / nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag & drop.
MIT License
284 stars 120 forks source link

Declares indexQuery return type #176

Closed mennotempelaar closed 1 year ago

mennotempelaar commented 1 year ago

When I open Laravel Nova with the implemented package I get the following error: https://flareapp.io/share/q5Yze1Qm. This PR will fix the error.

The Resource class from which the indexQuery method will be overwritten in the HasSortableRows Trait contains the : Builder response type declaration. This PR implements this : Builder response type declaration within the HasSortableRows Trait.

This fixes the issue.

PS: I've also bumped the laravel/nova version to ^4.27.10.

mennotempelaar commented 1 year ago

I've changed the version of laravel/nova back to 4.24.0 since it has no changes with the latest version.

I'll try to search for the change in the laravel/nova package for when the Builder response type was added, but for now this will do.

Tarpsvo commented 1 year ago

Thanks a ton @mennotempelaar! :) Your fix is now live in 3.4.6.