Advertisement
Guest User

Untitled

a guest
Jun 27th, 2020
459
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. public function store(Request $request)
  2.     {
  3.         $health = new health();
  4.         $health->nama = $request->nama;
  5.         $health->healt = $request->healt;
  6.         $health->note = $request->note;
  7.         $health->Save();
  8.  
  9.         if ($request->id_health == $health->id) {
  10.             foreach ($request->add_form as $value) {
  11.                 $more = new healthmore();
  12.                 $more->id_health = $health->id;
  13.                 $more->health = $value['health'];
  14.                 $more->notes = $value['notes'];
  15.                 $more->Save();
  16.             }
  17.         }
  18.  
  19.         return back();
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement