public function getView($tid = false) { // Do our checks to make sure things are in place if ($tid) { $match = Match::find($tid); if ($match) { $this->data['leagues'] = League::all(); $this->data['teams'] = Team::all(); $this->data['match'] = $match; $this->layout->content = View::make($this->view . '.edit.match', $this->data); } else { return Redirect::action('Admin_MatchesController@getIndex'); } } else { return Redirect::action('Admin_MatchesController@getIndex'); } }
/** * Display a listing of the resource. * * @return Response */ public function index() { $teams = Team::all(); return View::make('team.index', ['teams' => $teams]); }
<?php $team = Team::all(); ?> <table class='table table-striped table-responsive' id='teamtable'> <thead> <tr> <th>Team</th> </tr> </thead> <tbody> <tr> <?php $i = 1; ?> @foreach($team as $team) <td > <div class="col-xs-12"> <div class="col-sm-5"> @if($team->image == "") {{ HTML::image("http://placehold.it/100x100","",array('class'=>'img-rounded')) }} @else {{ HTML::image("uploads/team/{$team->image}","",array('class'=>'img-rounded thumbnail','style'=>'height:100px;width:100px')) }} @endif </div> <div class="col-sm-7" style="font-size: 12px"> <div class="col-xs-8"> Name : <strong>{{$team->name}}</strong><br> Title : <strong>{{ $team->title }}</strong><br>
/** * Display a listing of the resource. * * @return Response */ public function index() { $teams = Team::all(); return View::make('view')->with('teams', $teams); }
$round = Round::where_team_id_and_station_id($team_id, $station_id)->first(); return View::make('round.edit', array('round' => $round, 'station' => $round->station, 'team' => $round->team)); }); // GET Form for editing a round Route::put('(:any)/(:num)', function ($slug, $team_id) { $id = Round::where_station_id_and_team_id(Input::get('station_id'), Input::get('team_id'))->only('id'); Round::update($id, Input::all()); return Redirect::to($slug); }); // GET One station Route::get('(:any)', function ($slug) { $station = Station::where('slug', '=', $slug)->first(); if (empty($station)) { return Response::error('404'); } $teams = Team::all(); $stationRounds = Round::where('station_id', '=', $station->id)->get(); $teamsAdded = array(); $teamslist = array(); foreach ($stationRounds as $sr) { $teamsAdded[] = $sr->team->id; } foreach ($teams as $team) { if (!in_array($team->id, $teamsAdded)) { $teamslist[$team->id] = $team->name; } } $rounds = Round::where('station_id', '=', $station->id)->get(); return View::make('station', array('station' => $station, 'rounds' => $rounds, 'teamslist' => $teamslist)); }); });
public static function index() { self::check_logged_in(); $teams = Team::all(); View::make('Team/index.html', array('teams' => $teams)); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // $teams = Team::all(); return view('admin/teams')->withTeam($teams)->withNum(1); }
public function get_renew() { $teams = Team::all()->sortBy(function ($team) { if (null !== $team->years->first()) { return -$team->years->first()->id; } else { return 0; } }); return View::make('teams.renew')->with('teams', $teams); }