Skip to content

Commit

Permalink
update stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoud-Italy committed Jul 28, 2020
1 parent e8b3e7a commit 3a54f3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/stubs/model.stub
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class DummyClass extends Model
// use SoftDeletes;
protected $guarded = [];


// imageable polymorphic
// public function image() {
// return $this->morphOne(Image::class, 'imageable');
Expand Down Expand Up @@ -52,9 +51,11 @@ class DummyClass extends Model
// }



// feel free to add any query filter as much as you want...



$obj = $obj->paginate($value['paginate'] ?? 10);
return $obj;
}
Expand Down
1 change: 1 addition & 0 deletions resources/stubs/request.stub
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class DummyClass extends FormRequest
];
}

// in case you want to return single line of error instead of array of errors..
protected function formatErrors (Validator $validator)
{
return ['message' => $validator->errors()->first()];
Expand Down

0 comments on commit 3a54f3e

Please sign in to comment.