API Resources हे transformation classes आहेत जी Eloquent models (आणि collections) JSON मध्ये serialized करण्यावर नियंत्रण करतात API responses साठी. ते तुम्हाला API output अचूकपणे आकार देण्यास देतात — कोणती fields expose करायची हे निवडून, त्यांचे नाव बदलून, values format करून, आणि संबंधित data समाविष्ट करून — API representation आणि database structure यांमध्ये decoupling करताना.
समस्या: raw models expose करणे
::();
