当前位置: 首页>>代码示例>>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;未经允许,请勿转载。