Skip to content

Commit 87d7300

Browse files
author
ahmadhuss
committed
refactor: Updated Tip 3
1 parent 8d8a409 commit 87d7300

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/Exceptions/Handler.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ public function render($request, Throwable $e)
4848
if ($e instanceof ModelNotFoundException) {
4949
// str_replace(find:required,replace:required,string,count) => Returns a string or an array with the replaced values
5050
return response()->json([
51-
'error' => 'Entry for '.str_replace('App\\Models\\', '', $e->getModel()). ' not found',
52-
'model' => $e->getModel()
51+
'error' => 'Entry for '.str_replace('App\\Models\\', '', $e->getModel()). ' not found'
5352
], 404);
5453
}
5554

0 commit comments

Comments
 (0)