Answers for "check if data exist in database laravel"

PHP
0

check table exists in db laravel

if (!Schema::hasTable('table_name')) {
    // Code to create table
}
Posted by: Guest on July-15-2020
1

validate data exist in database lara vel

$this->validate($request, [
        'email' => 'required|exists:user|email',
    ]);
Posted by: Guest on July-19-2021
1

validate data exist in database lara vel

if (User::where('email', Input::get('email'))->exists()) {
    // exists
}
Posted by: Guest on July-19-2021
1

if notexists in laravel query

if (User::where('email', '=', Input::get('email'))->exists()) {
   // user found
}
Posted by: Guest on July-23-2020
1

check for an existing user laravel eloquent

$users = User::where('email', '=', $request->input('email'))->first();
if ($users === null) {
  // User does not exist
} else {
  // User exits
}
Posted by: Guest on August-18-2020

Code answers related to "check if data exist in database laravel"

Browse Popular Code Answers by Language