您可以轻松的检查数据表或字段是否存在,使用 hasTable 和 hasColumn 方法:
if (Schema::hasTable('users')) { // }
if (Schema::hasColumn('users', 'email')) { // }