public function store(StorePersonRequest $request) { $person = new \App\Person(); $person->person_name = $request->person_name; $person->save(); return response()->json($person); }
private function createPerson($params) { try { $person = new \App\Person(); $person->setParams($params); $person->save(); return $person; } catch (\Exception $e) { getSystem()->getRender()->error(500, "Error while creating new person", $e); } }