File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
user_guide_src/source/models Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,8 @@ The Model's CRUD methods will take a step of work away from you and automaticall
116116the resulting data, instead of the Result object. This setting allows you to define
117117the type of data that is returned. Valid values are '**array **' (the default), '**object **', or the **fully
118118qualified name of a class ** that can be used with the Result object's ``getCustomResultObject() ``
119- method.
119+ method. Using the special ``::class `` constant of the class will allow most IDEs to
120+ auto-complete the name and allow functions like refactoring to better understand your code.
120121
121122$useSoftDeletes
122123---------------
Original file line number Diff line number Diff line change 77class JobModel extends Model
88{
99 protected $ table = 'jobs ' ;
10- protected $ returnType = ' \App\Entities\Job ' ;
10+ protected $ returnType = \App \Entities \Job::class ;
1111 protected $ allowedFields = [
1212 'name ' , 'description ' ,
1313 ];
You can’t perform that action at this time.
0 commit comments