1. Go to this page and download the library: Download invoate/console-commands library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
invoate / console-commands example snippets
Schema::create('teams_users', function (Blueprint $table) {
$table->foreignId('team_id')->constrained();
$table->foreignId('user_id')->constrained();
//..
});
Schema::create('teams_users', function (Blueprint $table) {
$table->integer('team_id');
$table->integer('user_id');
//..
});
Schema::create('teams_users', function (Blueprint $table) {
//..
$table->string('role');
$table->timestamp('expires_at');
//..
});
Schema::create('teams_users', function (Blueprint $table) {
$table->ulid();
//..
});
Schema::create('teams_users', function (Blueprint $table) {
//
});
bash
php artisan make:pivot table1 table2
bash
php artisan make:pivot User Team
bash
php artisan make:pivot User Team --without-timestamps
bash
php artisan make:pivot User Team --model
# INFO Migration [database/migrations/2023_02_20_153354_create_teams_users_table.php] created successfully.
# INFO Model [app/Models/TeamUser.php] created successfully.
bash
php artisan refresh
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.