daniel-de-wit/laravel-mysql-move-column
最新稳定版本:1.0.0
Composer 安装命令:
composer require daniel-de-wit/laravel-mysql-move-column
包简介
A Laravel package for simplifying rearranging MySQL database columns
README 文档
README
A Laravel package for simplifying rearranging MySQL database columns.
Installation
You can install the package via composer:
composer require daniel-de-wit/laravel-mysql-move-column
The package is loaded using Package Discovery, when disabled read Manual Installation.
Usage
The method moveColumn is made available for moving a MySQl column to a new position.
<?php declare(strict_types=1); use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; return new class extends Migration { public function up(): void { Schema::table('users', function (Blueprint $table): void { $table->moveColumn('name', 'id'); }); } };
Manual Installation
When disabled, register the LaravelMySQLMoveColumnServiceProvider manually by adding it to your config/app.php
/* * Package Service Providers... */ DanielDeWit\LaravelMySQLMoveColumnServiceProvider\Providers\LaravelMySQLMoveColumnServiceProvider::class,
Testing
composer test
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 147
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-31