當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Team::all方法代碼示例

本文整理匯總了PHP中Team::all方法的典型用法代碼示例。如果您正苦於以下問題:PHP Team::all方法的具體用法?PHP Team::all怎麽用?PHP Team::all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Team的用法示例。


在下文中一共展示了Team::all方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getView

 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');
     }
 }
開發者ID:TsunamiNori,項目名稱:Raffles,代碼行數:17,代碼來源:MatchesController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $teams = Team::all();
     return View::make('team.index', ['teams' => $teams]);
 }
開發者ID:piyrus,項目名稱:proware,代碼行數:10,代碼來源:TeamController.php

示例3:

<?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>
開發者ID:AmaniYunge,項目名稱:SYoDeO,代碼行數:31,代碼來源:list.blade.php

示例4: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $teams = Team::all();
     return View::make('view')->with('teams', $teams);
 }
開發者ID:Homeboyzandroid,項目名稱:greensport,代碼行數:10,代碼來源:TeamController.php

示例5: array

        $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));
    });
});
開發者ID:nikek,項目名稱:bossys,代碼行數:31,代碼來源:routes.php

示例6: index

 public static function index()
 {
     self::check_logged_in();
     $teams = Team::all();
     View::make('Team/index.html', array('teams' => $teams));
 }
開發者ID:Jonharju,項目名稱:Tsoha-Bootstrap,代碼行數:6,代碼來源:team_controller.php

示例7: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $teams = Team::all();
     return view('admin/teams')->withTeam($teams)->withNum(1);
 }
開發者ID:alaaelgndy,項目名稱:eduAppSite,代碼行數:11,代碼來源:teamController.php

示例8: get_renew

 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);
 }
開發者ID:robinchow,項目名稱:rms,代碼行數:11,代碼來源:TeamsController.php


注:本文中的Team::all方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。