예제 #1
0
 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');
     }
 }
예제 #2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $teams = Team::all();
     return View::make('team.index', ['teams' => $teams]);
 }
예제 #3
0
<?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>
예제 #4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $teams = Team::all();
     return View::make('view')->with('teams', $teams);
 }
예제 #5
0
파일: routes.php 프로젝트: nikek/bossys
        $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));
    });
});
예제 #6
0
 public static function index()
 {
     self::check_logged_in();
     $teams = Team::all();
     View::make('Team/index.html', array('teams' => $teams));
 }
예제 #7
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $teams = Team::all();
     return view('admin/teams')->withTeam($teams)->withNum(1);
 }
예제 #8
0
 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);
 }