File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 33namespace SMartins \Exceptions \Handlers ;
44
55use Exception ;
6+ use Illuminate \Support \Str ;
67use InvalidArgumentException ;
78use Illuminate \Auth \AuthenticationException ;
89use Illuminate \Validation \ValidationException ;
@@ -157,7 +158,7 @@ public function getDefaultPointer()
157158 */
158159 public function getDefaultTitle ()
159160 {
160- return snake_case (class_basename ($ this ->exception ));
161+ return Str:: snake (class_basename ($ this ->exception ));
161162 }
162163
163164 /**
Original file line number Diff line number Diff line change 22
33namespace SMartins \Exceptions \Handlers ;
44
5+ use Illuminate \Support \Str ;
56use SMartins \Exceptions \JsonApi \Error ;
67use SMartins \Exceptions \JsonApi \Source ;
78use Illuminate \Database \Eloquent \ModelNotFoundException ;
@@ -35,7 +36,7 @@ public function handle()
3536 return (new Error )->setStatus (404 )
3637 ->setCode ($ this ->getCode ('model_not_found ' ))
3738 ->setSource ((new Source ())->setPointer ('data/id ' ))
38- ->setTitle (snake_case (class_basename ($ this ->exception )))
39+ ->setTitle (Str:: snake (class_basename ($ this ->exception )))
3940 ->setDetail ($ detail );
4041 }
4142
You can’t perform that action at this time.
0 commit comments