I have a full page route component. I have route bound models, and I like the fluidity of auto binding them when I declare them as properties:
class ReviewFormComponent extends Component {
public User $user;
public Booking $booking;
}
What I don’t want is to expose primary key fields and any other sensitive information. I read in docs “Public props are visible to the front end, you SHOULD NOT store sensitive data in them.” Does that include properties of Eloquent models?
Other than specifying fields as ‘hidden’ in the model, do I have another option here?
TIA