FareedR
126
3
Laravel

checking multiple table for unique validation

Posted 1 month ago by FareedR

i separate table by their role. how can i check their email has been taken or not & how can i update same user with same email address ? can i just put ignore('$user->id') ?

'email' => 'required|unique:superadmins,email|unique:admins,email|unique:lecturers,email|unique:students,email',

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.