liquid207 / laravel-enum-migration
Macros for migrate enum column.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/liquid207/laravel-enum-migration
Requires
- illuminate/database: 5.4.*|5.5.*|5.6.*|5.7.*|5.8.*
This package is auto-updated.
Last update: 2026-01-07 19:12:56 UTC
README
Macros for migrate enum column.
Features
- Append a new option to enum column.
- Remove options from enum column by name.
Installation
- Run
composer require liquid207/laravel-enum-migration
Usage
class User extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('users', function (Blueprint $table) { // Append one $table->enumAppend('type', 'option1'); // Append array $table->enumAppend('type', ['option2', 'option3']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('users', function (Blueprint $table) { // Remove one $table->enumRemove('type', 'option1'); // Remove array $table->enumRemove('type', ['option2', 'option3']); }); } }