laravel/framework — pull request #4885 by FractalizeR (2014-06-29 01:09:49+00:00)
Title: Custom Column Type in Schema Builder implementation

This is an implementation of custom column types in Schema Builder mentioned in #3393, #678, #376.

Custom column type is added to the table by calling blueprint's ```custom()``` method which receives closure.

$blueprint->custom('mycolumn', function ($column)

```php
Schema::create('user', function (Blueprint $table) {
$table->custom('mycolumn', function ($column)
{
return 'MY_CUSTOM_COLUMN_TYPE';
});
```

The generated SQL statement will look like

```sql
alter table `user` add `mycolumn` MY_CUSTOM_COLUMN_TYPE not null
```
And implementation is very simple and requires very small changes in the code. Test included. PR sent to master since this is a new feature. Though it is a non-breaking and may be it could be included in 4.x?