SHARE
TWEET

laravel auth

a guest Jun 26th, 2015 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. protected function create(array $data)
  2.     {
  3.  
  4.         $user = User::create([
  5.  
  6.             'name' => $data['name'],
  7.             'email' => $data['email'],
  8.             'password' => bcrypt($data['password']),
  9.  
  10.         ]);
  11.  
  12.         $user_details = new User_Detail();
  13.  
  14.         $user_details->fill([
  15.  
  16.             'age' => $data['age'],
  17.             'gender' => $data['gender'],
  18.             'weight' => $data['weight'],
  19.             'user_pic' => $data['user_pic'],
  20.  
  21.         ]);
  22.      
  23.         return $user_details->save([$user]);
  24.  
  25.  
  26.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top