Пример #1
0
 public function aktivasi(Team $team)
 {
     $message = 'Data ' . $team->namateam . ' berhasil di aktivasi';
     if ($team->ketua()->first()->update(['level' => 1])) {
         return redirect()->back()->with('status', $message);
     }
     return redirect::to()->back()->with('status', 'Data ' . $team->namateam . ' tidak berhasil di aktivasi');
 }