Migration Transporter
=====================

Have you ever taken a project that had a messy, unstructured database design? Have you ever wish you can transform those project to become more Eloquent friendly?

```php
use App\User;
use Illuminate\Database\Query\Builder;
use Orchestra\Transporter\Blueprint;
use Orchestra\Transporter\Schema;

Schema::table('member', function (Blueprint $blueprint) {
    $blueprint->connection('legacy')
        ->key('member_id')
        ->filter(function (Builder $query) {
            $query->where('active', '=', 1);
        })->transport(function ($data) {
            $user = new User([
                'email' => $data->u_email,
                'password' => $data->u_password,
            ]);

            $user->save();

            return $user->getKey();
        });
})->start();
```

Migration Transporter
=====================

Have you ever taken a project that had a messy, unstructured database design? Have you ever wish you can transform those project to become more Eloquent friendly?

```php
use App\User;
use Illuminate\Database\Query\Builder;
use Orchestra\Transporter\Blueprint;
use Orchestra\Transporter\Schema;

Schema::table('member', function (Blueprint $blueprint) {
    $blueprint->connection('legacy')
        ->key('member_id')
        ->filter(function (Builder $query) {
            $query->where('active', '=', 1);
        })->transport(function ($data) {
            return new User([
                'email' => $data->u_email,
                'password' => $data->u_password,
            ]);
        });
})->start();
```

Update example, looks cleaner by just returning a simple Eloquent object.
Update example, looks cleaner by just returning a simple Eloquent
object.

Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
