<?php namespace App\Services; use App\Zone; class ZonesService { public function getMatchStadiumMap($matchEventId) { $stadiumMap = ''; $stadium = Zone::select('zones.img') ->join('match_events', 'match_events.zone_id', '=', 'zones.id') ->where('match_events.id', $matchEventId) ->first(); if ($stadium) { $stadiumMap = $stadium->img; } return $stadiumMap; } }