atayahmet / laravel-nestable

Laravel 5 nested category/menu generator
MIT License
214 stars 52 forks source link

Not Compatible With Laravel 5.6 #53

Closed zymawy closed 6 years ago

zymawy commented 6 years ago

Hello Thank You For Your Time Making Good Work Out There 🔥

I Have Installed The Package 📦

On Laravel 5.6 💯 But It's Not Displaying When Using The Methods On Your Package I May Do Something Wrong

ultrono commented 6 years ago

I'm using this package with Laravel 5.6.15 without issue. You'll need to provide more details so people can help.

ultrono commented 6 years ago

Ah, just realized you'll need version 0.8.6 or above. It appears Laravel 5.6 support was added then - https://github.com/atayahmet/laravel-nestable/commit/49668c3c78066b5d0da09b20979096e00abf72fd

I'd always recommend having a look at the releases pages and recent commits as all the information is there.

zymawy commented 6 years ago

Hello @ultrono I have updated the package 📦 to version 0.8.7

When I Die And Dump The

dd(Category::nested()->get())

In Empty Array Returns 📏 though I have dummy data on category

I have added use Nestable\NestableTrait; use NestableTrait;

to my category model ❓

zymawy commented 6 years ago

Solved 💯

ultrono commented 6 years ago

@zymawy If possible please add your solution here to help other people.

zymawy commented 6 years ago

In My Category Migration File, I Was Using $table->unsignedInteger('parent_id'); Instead Of $table->integer('parent_id')->unsigned();