Support the ongoing development of Laravel.io →
posted 8 years ago
Database
Last updated 1 year ago.
0

I think you must cast $category as an array like this $category->toArray(), because $category from your controller return a collection and not an array, as it need in your 2snd parameter in Form::select() helper.

It works fine for me

0

jay4yam said:

I think you must cast $category as an array like this $category->toArray(), because $category from your controller return a collection and not an array, as it need in your 2snd parameter in Form::select() helper.

It works fine for me

I'll try that, Thanks.

0

Thank you jay4yam, :) It works now :) It's a big help, have a nice day

0

Sign in to participate in this thread!

Eventy

Your banner here too?

neybz09 neybz09 Joined 29 Jun 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.