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


PHP Item::whereIdBanque方法代碼示例

本文整理匯總了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
         }
     }
 }
開發者ID:S4M37,項目名稱:Project_GangOfThree,代碼行數:25,代碼來源:GestNotes.php

示例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);
     }
 }
開發者ID:S4M37,項目名稱:Project_GangOfThree,代碼行數:23,代碼來源:StationController.php


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