Support the ongoing development of Laravel.io →
Database Eloquent Views
Last updated 2 years ago.
0

$projects is an array, so you have to use a foreach loop to go through the results. Probably want to select mains.id as mains_id, so you can call the id.

@foreach($projects as $project)
	{{ $project->mains_id }}
@endforeach

But why not use the Eloquent Relations? Much easier http://laravel.com/docs/eloquent#relationships

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

embj69 embj69 Joined 26 Feb 2014

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.