chuoke / laravel-table-comment
Laravel 迁移表的注释工具
1.0.1
2021-07-14 01:22 UTC
Requires
- php: ^7|^8.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-14 08:01:27 UTC
README
这是一个用于在 Laravel 迁移中注释表的简单扩展。
安装
您可以通过 composer 安装此包
composer require chuoke/laravel-table-comment
使用方法
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; // use Illuminate\Database\Migrations\Migration; use Chuoke\LaravelTableComment\Migration; class CreateUsersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('users', function (Blueprint $table) { $table->id(); $table->string('name', 30)->comment('Name'); $table->comment('User info table'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('users'); } }
许可
MIT 许可证 (MIT)。更多信息请参阅许可文件。