The FormRequest rules check the input of the form for validity but your id is in the query.
ftiersch said:
The FormRequest rules check the input of the form for validity but your id is in the query.
Can you explain little bit? because I am a beginner
You put the foodtype ID in the URL of the form:
{{ $foodtype->id }}
Your EditFoodtypeRequest is responsible for validating the content of the form, so the input fields. In the rules array you could validate the type field, not the ID field. Validating a URL parameter should be done somewhere else I think.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community