Example #1
0
 public function adminChange(User $user, Skill $skill)
 {
     if ($skill->active == 0) {
         //the post is already disabled
         $skill->update(['active' => 1]);
         Flash::success(trans('admin/messages.skillActivate'));
     } elseif ($skill->active == 1) {
         //the post is already enabled
         $skill->update(['active' => 0]);
         Flash::success(trans('admin/messages.skillBan'));
     }
     return redirect()->back();
 }