Skip to content

Commit

Permalink
on pet creation not returning created date, instead was returning the…
Browse files Browse the repository at this point in the history
… data given as input
  • Loading branch information
raysummee committed May 15, 2021
1 parent c507554 commit d739b4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/API/PetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public function store(Request $request)
return response(['message'=>$e->getMessage(), 400]);
}

$request->user()->pet()->create($validateData);
$data = $request->user()->pet()->create($validateData);

return response(["pet" => $validateData], 201);
return response(["pet" => $data], 201);
}

public function update(Request $request, Pet $pet)
Expand Down

0 comments on commit d739b4a

Please sign in to comment.