Answers for "laravel check if primary key exists"

PHP
0

laravel check if primary key exists

$keyExists = DB::select(
    DB::raw(
        'SHOW KEYS
        FROM your_table_name
        WHERE Key_name=\'your_key_name\''
    )
);
Posted by: Guest on April-30-2020

Code answers related to "laravel check if primary key exists"

Browse Popular Code Answers by Language