Answers for "check if data exists in table 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
5

laravel check record exists

$user = User::where('email', '=', Input::get('email'))->first();
if ($user === null) {
   // user doesn't exist
}
Posted by: Guest on April-08-2020
1

if notexists in laravel query

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

Code answers related to "check if data exists in table laravel"

Browse Popular Code Answers by Language