Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

creating custom database

use IlluminateSupportFacadesDB;

// 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");
Source by laracasts.com #
 
PREVIOUS NEXT
Tagged: #creating #custom #database
ADD COMMENT
Topic
Name
2+7 =