Answer the question
In order to leave comments, you need to log in
How in laravel to check if the selected list belongs to the user?
I need to validate the entered data by id.
The problem is that there is no sport column in the table:
'sport' => Rule::exists('sport_info')->where(function ($query) {
return $query->where('user_id', Auth::id());
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question