Creating Schema with Laravel 5.1

Posted on

Question :

Is there any way I can make Laravel 5.1 itself create a database as there is no such database? (can be either in a table of a master bank or in the same bd’s list itself … whatever)


Answer :

It will look something like:

 DB::getConnection()->statement('CREATE DATABASE :schema', ['schema' => $schemaName]);


Leave a Reply

Your email address will not be published. Required fields are marked *