You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 7, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+34
Original file line number
Diff line number
Diff line change
@@ -242,6 +242,40 @@ class Foo
242
242
}
243
243
```
244
244
245
+
## Helpers
246
+
247
+
For your convenience, starting from version [2.17](https://github.com/TheDragonCode/contracts/releases/tag/v2.17.0) of
248
+
the [`dragon-code/contracts`](https://github.com/TheDragonCode/contracts/releases/tag/v2.17.0) package, we have added a new interface that declares the implementation of the
249
+
public `dto` method. This way you can better control your application to return DTO objects.
250
+
251
+
Of course, don't forget to implement the interface 😉
252
+
253
+
For example:
254
+
255
+
```php
256
+
namespace App\Http\Requests\Companies;
257
+
258
+
use App\Objects\Company;
259
+
use DragonCode\Contracts\DataTransferObject\DataTransferObject;
260
+
use DragonCode\Contracts\DataTransferObject\Dtoable;
0 commit comments