Example #1
0
 public function delete($id)
 {
     if (Auth::check()) {
         Tahunajar::find($id)->delete();
         return \Redirect::to('tahunajar');
     } else {
         return \Redirect::to('login');
     }
 }
Example #2
0
 public function edit($id)
 {
     if (Auth::check()) {
         $data = Bobotnilai::join("tahunajar", "bobotnilai.id_ta", "=", "tahunajar.id")->where("bobotnilai.id", "=", $id)->select('bobotnilai.id', 'bobotnilai.name', 'tahunajar.nama')->first();
         $thnajar = Tahunajar::all();
         return \View::make('Addons.BobotNilai.edit')->with("data", $data)->with('thnajar', $thnajar);
     } else {
         return \Redirect::to('login');
     }
     //
 }
 public function add()
 {
     if (Auth::check()) {
         $thnajar = Tahunajar::all();
         $siswa = Siswa::all();
         $pelanggaran = Pelanggaran::all();
         return \View::make('Addons.Pelanggaran.pelanggaranadd')->with("thnajar", $thnajar)->with("siswa", $siswa)->with("pelanggaran", $pelanggaran);
     } else {
         return \Redirect::to('login');
     }
 }
Example #4
0
 public function addsiswakelasform($id, $tid)
 {
     if (Auth::check()) {
         $students = Siswa::all();
         $kelas = Kelas::all();
         $thnajar = TahunAjar::all();
         return \View::make('Addons.Siswa.addsiswakelasform')->with('kelasid', $id)->with('tid', $tid)->with('students', $students)->with('kelas', $kelas)->with('thnajar', $thnajar);
     } else {
         return \Redirect::to('login');
     }
 }
Example #5
0
                $sisa =  $bobot->name- $sum;
                echo $sisa;

                 ?> </td>
            </tr>
            </tbody>
          </table>@endif
        </div>
*/
?>

<!-- // -->
@foreach($datapelanggaran as $thnajr)
<h3>{{ $thnajr->thn }}</h3>
<?php 
$thnajrid = TahunAjar::nameforId($thnajr->thn);
$lists = PelanggaranSiswa::where('id_siswa', '=', $sisid)->where('id_ta', '=', $thnajrid)->get();
?>
<div class="table-responsive">
    <table class="table table-bordered table-striped table-condensed">
        <thead>
            <tr>
                <th>Jenis Pelanggaran</th>
                <th>Bobot Nilai</th>
            </tr>
        </thead>
        <tbody>
        <?php 
$sum = 0;
?>
        @foreach($lists as $list)