Skip to content

Instantly share code, notes, and snippets.

@moElwan
Created January 16, 2017 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moElwan/79b2f3daa5667b880d3a5c3c05a12800 to your computer and use it in GitHub Desktop.
Save moElwan/79b2f3daa5667b880d3a5c3c05a12800 to your computer and use it in GitHub Desktop.
Laravel IDE_helper support for migration common functions.
//add to \vendor\laravel\framework\src\Illuminate\Support\Fluent.php
// NOTE: this is a phpdoc comment so it has to be added just before the class signature ( class Fluent )
/**
* Class Fluent
* @package Illuminate\Support
*
* @see http://laravel.com/docs/master/schema
*
* @method Fluent unsigned() Set INTEGER to UNSIGNED
* @method Fluent nullable() Designate that the column allows NULL values
* @method Fluent default(mixed $value) Declare a default value for a column
* @method Fluent first() Place the column "first" in the table (MySQL Only)
* @method Fluent unique() Designate that the column values is unique
* @method Fluent after(string $column) Place the column "after" another column (MySQL Only)
* @method Fluent comment(string $mycomment) Add a comment to a column
*
* @method Fluent references(string $key) Specifies the name of the foreign key constraint
* @method Fluent on(string $table) Specifies the table on which the constraint applies to
* @method Fluent onDelete(string $action) Specifies the action to happen on a DELETE
* @method Fluent onUpdate(string $action) Specifies the action to happen on an UPDATE
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment