This is the first time I am using Api Resource in Laravel 5.8 to return data to an application. There is a User model contains some public and private information about a user. A user is allowed to see all his/her information (same as name, phone number, email, ...) but others are allowed to see only the name and username. How can I handle this in Api Resource?
Thanks in advance.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/33IwLXK
via IFTTT
Aucun commentaire:
Enregistrer un commentaire