Exemplo n.º 1
0
 public function search()
 {
     $collection = Team::with('tournamentTeams.tournament')->where('name', 'like', Input::get('term') . '%')->get();
     return $this->response->collection($collection, new TeamSearchTransformer(), 'teams');
 }
Exemplo n.º 2
0
 public function show($id)
 {
     //show single
     $record = Team::with($this->related)->findOrFail($id);
     return $record;
 }