Skip to content

Instantly share code, notes, and snippets.

@clouddueling
Created November 21, 2013 01:35
Show Gist options
  • Select an option

  • Save clouddueling/7574591 to your computer and use it in GitHub Desktop.

Select an option

Save clouddueling/7574591 to your computer and use it in GitHub Desktop.
MySQL to Migrations for Laravel 3 may work with 4 not sure if it uses same functions.
<?php
Route::get('test', function() {
$schema = SqlMigrations::convert('clouddueling')
->up('
$user = User::create([
"email" => "admin@clouddueling.com",
"password" => Hash::make("admin"),
"admin" => 1
]);
$user->account_user_id = $user->id;
$user->save();
$user = User::create([
"email" => "user@clouddueling.com",
"password" => Hash::make("user"),
]);
$user->account_user_id = $user->id;
$user->save();
')
->write();
dd($schema);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment