Hi all, I am building an API for my application and I want to limit my endpoints to the JSON Data, I just want to see. For instance when I handle Post-data I just want to handle certain fields, due to the fact that I use, currently, mass assignment in my model I am thinking about a way to prevent, that some wrong data is inserted into the datebase.
The most important fields are protected by $guarded array in the model, but I want to limit the input to certian fields. Is this possible with the request validator? Or should I go away from the mass assignment, in this case?
Kind regardsVav
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community