$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
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community