Compilation of all shell commands
Make sure your .env file has the right parameters.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=nihon
DB_USERNAME=root
DB_PASSWORD=
public function boot()
{
Schema::defaultStringLength(191);
}
# Replace [xx] with the singular name of the table you want.
php artisan make:model --migration [Name]
# But if you want to create them separately
php artisan make:migration create_[name]s_table
php artisan make:model [Name]
<aside> ⚠️ Be careful not to git the migration file before testing and reviewing it.
</aside>
public function up()
{
Schema::create('[name]s', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->softDeletes();
}
}