本文整理汇总了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');
}
}
示例2: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$teams = Team::all();
return View::make('team.index', ['teams' => $teams]);
}
示例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>
示例4: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$teams = Team::all();
return View::make('view')->with('teams', $teams);
}
示例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));
});
});
示例6: index
public static function index()
{
self::check_logged_in();
$teams = Team::all();
View::make('Team/index.html', array('teams' => $teams));
}
示例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);
}
示例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);
}