How can I validate variable if variable name is different then name of column in DB.
'gameDetails.title' => [
'required',
'string',
'between:3,100',
Rule::unique('games')->ignore($this->input('gameId')),
],
In above example my input variable name is "gameDetails.title" but in DB my column name is just title. So in this case I have this error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'gameDetails.title' in 'where clause'
So how to tell "laravel" my column name is just "title"?
Thank you.
gameDetailsthe name of your database table?