#Securing response with laravel

1 messages · Page 1 of 1 (latest)

dusty crystal
#

Hi. I wonder what is the best practice for securing response data in laravel.
When the app become larger some model have so many column, and in the api response, no need to get all of the column.

what is better in your opinion:

  1. Declare hidden almost to all column in that model, and then in every service/repository use makeVisible when need accessing that hidden column.
  2. Hidden some crucial/sensitive data only in the model. then makeHidden or only select some needed in the model/service
  3. any other ideas?
    Thanks
blissful hinge
blissful hinge
#

Great talk 👍