/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $team = Team::with(['users'])->find($id); //dd($team->members); return view('admin.pages.teams.show', compact('team')); }
public function index() { $teams = Team::with(['event'])->orderBy('id')->get(); return $this->respond(['data' => $this->teamsTransformer->transformCollection($teams->all())]); }
public function team($id) { return $this->respond(['data' => (new TeamTransformer())->transform(Team::with('event', 'users')->find($id))]); }