Download the PHP package invoate/console-commands without Composer
On this page you can find all versions of the php package invoate/console-commands. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download invoate/console-commands
More information about invoate/console-commands
Files in invoate/console-commands
Package console-commands
Short Description This is my package console-commands
License MIT
Homepage https://github.com/invoate/console-commands
Informations about the package console-commands
Invoate Console Commands
These are a few console commands packaged together so they don't have to be recreated in new projects.
Installation
You can install the package via composer:
Usage
Pivot Make Command
The Pivot Make Command generates a migration for a pivot table. Table names can be passed in any order, the command will alphabetise them.
The table1
and table2
arguments can be existing Eloquent models or table names. Table names for Eloquent models will be automatically resolved.
By default the command generates foreign keys, this can be disabled with the --without-foreign-keys
flag.
Timestamp columns are also generated by default, the --without-timestamps
flag will disable these.
Additional columns can be created using the --columns
flag, they must be formatted in the column_name:column_type
format.
A pivot Eloquent model can be generated with the --with-model
flag.
Optionaly an id column can be generated using the --with-id
flag. By default this will generate a $table->id()
column, passing another Laravel supported column type with e.g. --id-type ulid
will change this.
If you do not wish to generate any columns for the pivot table you can use the --without-columns
flag.
Refresh
The RefreshCommand
is a simple wrapper for php artisan migrate:fresh --seed
.
Testing
Credits
- Oliver Lumby
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of console-commands with dependencies
spatie/laravel-package-tools Version ^1.14.0
illuminate/contracts Version ^9.0|^10.0