if (!Schema::hasTable('table_name')) {
// Code to create table
}
if (DB::table('orders')->where('finalized', 1)->exists()) {
// ...
}
if (DB::table('orders')->where('finalized', 1)->doesntExist()) {
// ...
}
$result = User::where('id',$id)->exists();