Skip to content

chuoke/laravel-table-comment

Repository files navigation

Laravel table comment for migration

Latest Version on Packagist GitHub Code Style Action Status Total Downloads


Just a simple extension for commenting table in laravel migration.

Installation

You can install the package via composer:

composer require chuoke/laravel-table-comment

Usage

<?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');
    }
}

License

The MIT License (MIT). Please see License File for more information.

About

Laravel table comment for migration

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages