join('providers as p', 's.provider_id', '=', 'p.id') ->join('locations as l', 's.location_id', '=', 'l.id') ->join('pricings as pr', 's.id', '=', 'pr.service_id') ->get(['s.*', 'p.name as provider_name', 'pr.*', 'l.name as location']); } public static function seedBoxDataShowPage(string $seed_box_id) { return DB::table('seedboxes as s') ->join('pricings as pr', 's.id', '=', 'pr.service_id') ->join('providers as p', 's.provider_id', '=', 'p.id') ->join('locations as l', 's.location_id', '=', 'l.id') ->where('s.id', '=', $seed_box_id) ->get(['s.*', 'p.name as provider_name', 'l.name as location', 'pr.*']); } public static function seedBoxEditDataPage(string $seed_box_id) { return DB::table('seedboxes as s') ->join('pricings as pr', 's.id', '=', 'pr.service_id') ->join('providers as p', 's.provider_id', '=', 'p.id') ->join('locations as l', 's.location_id', '=', 'l.id') ->where('s.id', '=', $seed_box_id) ->get(['s.*', 'p.name as provider_name', 'l.name as location', 'pr.*']); } }