本文整理汇总了PHP中app\models\Item::whereIdBanque方法的典型用法代码示例。如果您正苦于以下问题:PHP Item::whereIdBanque方法的具体用法?PHP Item::whereIdBanque怎么用?PHP Item::whereIdBanque使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Item
的用法示例。
在下文中一共展示了Item::whereIdBanque方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: attributeNote
function attributeNote($id_Station, $id_Etudiant, array $inputs, $id_Enseignant)
{
$id_Examen = Station::whereIdStation($id_Station)->first()->id_Examen;
$id_Session = Examen::whereIdExamen($id_Examen)->first()->id_Session;
$id_Note_Examen = $this->createNoteExamen($id_Examen, $id_Session, $id_Etudiant);
$arrayStatus = $this->createNoteStation($id_Note_Examen, $id_Station, $id_Enseignant);
$id_Banque = Station::whereIdStation($id_Station)->first()->id_Banque;
$items = Item::whereIdBanque($id_Banque)->get();
if (count($items) != count($inputs)) {
return response()->json(['status' => 0], 200);
} else {
if ($arrayStatus['status'] == 1) {
$id_Note_Station = $arrayStatus['id_Note_Station'];
$i = 0;
foreach ($items as $item) {
$this->createItemNote($item->id_Item, $id_Note_Station, $inputs[$i]);
$i++;
}
return 1;
} else {
return 2;
//Note Station existe
}
}
}
示例2: show
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($sessionId = null, $examenId = null, $stationId = null)
{
if (is_null($stationId)) {
// display the hole examen in Specific Session
$stations = $this->gestSession->getStations($examenId);
return view('stationView')->with('stations', $stations)->with('sessionId', $sessionId)->with('examenId', $examenId);
} else {
// display specific session
$station = $this->gestSession->getStation($stationId);
$contexte = $this->gestSession->getContexte($station->id_Contexte);
$critere = $this->gestSession->getCritere($station->id_Critere);
$domaine = $this->gestSession->getDomaine($station->id_Domaine);
$systeme = $this->gestSession->getSysteme($station->id_Systeme);
$items = Item::whereIdBanque($station->id_Banque)->join('Competence', 'Item.id_Competence', '=', 'Competence.id_Competence')->OrderBy('id_Item', 'asc')->get();
return view('stationDetailView')->with('station', $station)->with('sessionId', $sessionId)->with('examenId', $examenId)->with('stationId', $stationId)->with('contexte', $contexte)->with('critere', $critere)->with('domaine', $domaine)->with('systeme', $systeme)->with('items', $items);
}
}