exists id in the table in laravel validation
'game_id' => 'required|exists:games,id,another_column,NULL',
exists id in the table in laravel validation
'game_id' => 'required|exists:games,id,another_column,NULL',
laravel 8 check if record exists
$subscription_count = DB::table('subscriptions')->where('pid_user',$pid_user)->count();
//check if any subscription plan exists
if($subscription_count == 0)
{
//record does not exist
}else{
//record exists
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us