예제 #1
0
 public function advantage(Shop $shop, Request $request)
 {
     if (!$request->has('advantage')) {
         $shop->advantages()->detach();
     } else {
         $shop->advantages()->sync($request->input('advantage'));
     }
     Flash::success('Adv  info updated');
     return redirect()->back();
 }