is there any way to create new database with Laravel
CodeBehind ? I mean, I\'m not able to use php artisan
or something like that. Just because I want
You can create as many Databases from controller by passing the dbname like this
public function index() {
$userName = 'bigboytr'; // Your Database name to be created
DB::statement("CREATE DATABASE $userName");
}
Warning :
You don't need to create one database for every user as it will make the system very complex. Ex., If you have some thousands of user in some case, then moving the user's information to registered users 'general' database would be very tough
Recommendation :
What i suggest you it to create a new table for unregistered user, so that you can move them to registered user's table, which would make your process easy.
Tip :
You can compare the Database Engine and choose the best for your match like this