/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ protected function create(array $data) { return User::create(['name' => $data['name'], 'email' => $data['email'], 'phone' => $data['phone'], 'cell_phone' => $data['cell_phone'], 'address_1' => $data['address_1'], 'address_2' => $data['address_2'], 'profile_img' => (string) Image::make($data['profile_img'])->resize(100, 100)->encode('data-url'), 'password' => bcrypt($data['password'])]); }
protected function profilepic($imgfile, $path, $iduser) { $img = Image::make($path . '/' . $iduser . '/' . $imgfile)->resize(300, 300); $img->move($path, $imgfile); }