/**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $guru = Guru::find($id);
     $mapel = Mapel::all();
     $jurusan = Jurusan::all();
     return View('admin.guru.edit')->with('guru', $guru)->with('mapel', $mapel)->with('jurusan', $jurusan);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $jurusan = Jurusan::all();
     $soal = Soal::find($id);
     $mapel = Mapel::all();
     return View('admin.soal.edit')->with('jurusan', $jurusan)->with('mapel', $mapel)->with('soal', $soal);
 }
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Jurusan::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id_jurusan' => $this->id_jurusan]);
     $query->andFilterWhere(['like', 'jurusan', $this->jurusan]);
     return $dataProvider;
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $kelas = Kelas::find($id);
     $jurusan = Jurusan::all();
     return View('admin.kelas.edit')->with('kelas', $kelas)->with('jurusan', $jurusan);
 }
Exemple #5
0
 public static function jurusan()
 {
     $listData = ArrayHelper::map(Jurusan::find()->all(), 'id_jurusan', 'jurusan');
     return $listData;
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getJur()
 {
     return $this->hasOne(Jurusan::className(), ['id_jurusan' => 'id_jurusan']);
 }
 public function create_soal()
 {
     $guru = $this->getGuru();
     $jurusan = Jurusan::all();
     return View('guru.create_soal')->with('guru', $guru)->with('jurusan', $jurusan);
 }
 /**
  * Finds the Jurusan model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Jurusan the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Jurusan::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $jurusan = Jurusan::find($id);
     $kelas = Kelas::where('kode_jurusan', $id)->count();
     if ($kelas > 0) {
         $html = "Data Tidak dapat dihapus";
     } else {
         $html = "Data berhasil dihapus";
         $jurusan->delete();
     }
     Session::flash('pesan', $html);
     return Redirect::to('admin/jurusan');
 }
 public function show_all_jurusan()
 {
     $Jurusans = Jurusan::all();
     return $Jurusans;
     //return 'berhasil kuda';
 }
 public function detail_jurusan($idnya)
 {
     $jurusan = Jurusan::FindOrFail($idnya);
     return view('/content/scadmin/list_jurusan')->with('jurusans', $jurusan);
 }