thtg88 / laravel-db-scaffold-commands
Scaffold a DB with the given Laravel Artisan commands.
Installs: 10 698
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 2
Requires
- php: ^8.1
- ext-json: *
- ext-pdo: *
- illuminate/console: ^9.0|^10.0
- illuminate/support: ^9.0|^10.0
Requires (Dev)
- fakerphp/faker: ^1.13
- friendsofphp/php-cs-fixer: ^3.5
- mockery/mockery: ^1.4
- orchestra/testbench: ^8.5
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^4.3
This package is auto-updated.
Last update: 2024-11-06 17:04:15 UTC
README
Create and drop a MySQL or PostgreSQL DB with the given Laravel Artisan commands.
Installation
composer require --dev thtg88/laravel-db-scaffold-commands
Usage
Create Database
php artisan db:create database_name
This will use the connection details specified in your .env
file.
Drop Database
php artisan db:drop
This will use the connection details specified in your .env
file, including the database name.
Development
Clone the repo
# clone the repo
$ git clone https://github.com/thtg88/laravel-db-scaffold-commands.git
Add thhtg88/laravel-db-scaffold-commands
as a dependency of your API project in composer.json
:
{
...
"repositories": [
{
"type": "path",
"url": "../laravel-db-scaffold-commands"
}
],
"require": {
...
"thtg88/laravel-db-scaffold-commands": "*"
},
...
}
Next from your terminal run:
# Run composer update to bring in Laravel DB Scaffold Commands as dependancy
composer update
Tests
Laravel DB Scaffold Commands uses PHPUnit for testing.
You can run the whole tests suite using:
composer run-script test # or composer test # or ./vendor/bin/phpunit
License
Laravel DB Scaffold Commands is open-sourced software licensed under the MIT license.