Support the ongoing development of →
Requests Eloquent Database
Last updated 8 months ago.

I'm really not sure what you are trying to accomplish. If you only have one Piano in your Instruments table you can use the method ->first() instead of ->get() and you will get the object representing that row and use it like you do now (without the foreach part) in your view.

If you want to get all instruments in your table simply do Instrument::all() and you get all of them and can cycle through them in a foreach loop.


paginate ?


Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

Asumii asumii Joined 22 Nov 2015


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

Your logo here?

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

© 2023 - All rights reserved.