xelyos94ro / database
Database package for laravel
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/xelyos94ro/database
This package is auto-updated.
Last update: 2025-10-29 03:17:39 UTC
README
Requirements
- PHP 7.4
- Laravel 6/7
Installation
You can install the package via composer:
composer require xelyos94ro/database
Purpose
In laravel, before you use migrate command you must have a database. This package help you to create one with no effort.
Here's how you can use it:
use Xelyos\Database\Facade\XelyosDatabase; // If no parameter will be specified, will use the default value from ENV file XelyosDatabase::checkDatabaseExist(); XelyosDatabase::checkDatabaseExist($nameOfDatabase); // Create database (if database exist, another database will not be created) XelyosDatabase::createDatabase(); XelyosDatabase::createDatabase($nameOfDatabase);
This is very usefull for new projects. Just use console command to create database.
// This will generate the database
php artisan xelyos:database:create
// And now you can use migrate
php artisan migrate