예제 #1
0
 public function archive($id)
 {
     $item = $this->menuItem->find($id);
     if ($item->archive == 0) {
         $item->archive = 1;
         $message = 'Menu Item Archived!';
     } else {
         $item->archive = 0;
         $message = 'Menu Item Is Active!';
     }
     $item->save();
     return back()->with('success', $message);
 }