Example #1
0
 public function index(Student $student)
 {
     $actions['active'] = [];
     $actions['trashed'] = [];
     $programs = Program::all();
     $entryYears = $student->entryYear();
     if ($this->authis->check('admin.student.student.create')) {
         $actions['active'][] = 'create';
     }
     if ($this->authis->check('admin.student.student.destroy')) {
         $actions['active'][] = 'delete';
     }
     return view('student.student.index', compact('actions', 'programs', 'entryYears'));
 }
Example #2
0
 public function destroy($ids)
 {
     $ids = explode(',', $ids);
     Program::destroy($ids);
     return $this->formSuccess(route('admin.institute.program.index'), ['message' => 'Program studi berhasil dihapus']);
 }