Use the select method to grab exactly what you need in the 2 tables.
Item::join('buttons', 'items.cta_id','=','buttons.id')->where('build_id',$id)->select( array('items.*', 'buttons.*', 'items.id AS id') )->get();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community