📜  创建自定义数据库 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:19.249000             🧑  作者: Mango

代码示例1
use Illuminate\Support\Facades\DB;

// Connection name = `mysql` for me, adjust as suits for you
DB::connection('mysql')->statement("CREATE DATABASE ?", [$this->database]);
// Simply written
DB::connection('mysql')->statement("CREATE DATABASE my_new_db");