Source: medium.com

Laravel Request Hydration

Category: Laravel, PHP

One of the repeated stuff in the development is hydration the Data Transfer Objects. PHP ecosystem from old days works with array and in fact, array in PHP is one of the powerful tools. for small projects, personally prefer the array but nobody can ignore the DTO goodness. recently I made a tiny package to hydrate Data Transfer Object from the request, after installing two methods `castTo()` and `hydrateTo()` will be added to `Illuminate\Http\Request`. Laravel version: https://github.com/mvaliolahi/request-hydratorPure version: https://github.com/mvaliolahi/hyrator
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners