/** * @param $data * @return static */ public function CreateProfile($data) { //dd($data); $check = $this->checkProfileExists($data->email); if ($check == null) { //dd($data->id); return Profile::create(['user_id' => $data->id, 'email_1' => $data->email]); } }