Looking to hire Laravel developers? Try LaraJobs

laravel-table-comment maintained by chuoke

Description
Laravel table comment for migration
Author
Last update
2021/07/14 03:22 (dev-master)
License
Downloads
525

Comments
comments powered by Disqus

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.