When building an API, you may need a transformation layer that sits between your Eloquent models and the JSON responses that are actually returned to your application's users. Laravel's resource classes allow you to expressively and easily transform your models and model collections into JSON.
giống như model user có field password
khi em query trả về 1 model user, trong đó mặc định password
Ngữ cảnh 2
model em muon field password đc hash thì sao thầy, ví dụ md5
Ngữ cảnh