2012-07-12, 04:04 PM
* Euan T states that is correct.
* Euan T says that this is a migration from one of his apps:
* Euan T states that you have to install it first using php artisan migrate:install then you can do php artisan migrate:make create_navlinks_table or whatever
* Euan T states you then run the migrations using php artisan migrate
* Euan T says that this is a migration from one of his apps:
<?php
class Create_Navlinks_Table {
/**
* Make changes to the database.
*
* @return void
*/
public function up()
{
Schema::table('navlinks', function($table)
{
$table->increments('id');
$table->string('title');
$table->integer('type');
$table->text('location');
$table->integer('position');
$table->integer('navlink_id');
$table->timestamps();
$table->create();
});
}
/**
* Revert the changes to the database.
*
* @return void
*/
public function down()
{
Schema::drop('navlinks');
}
}
* Euan T states that you have to install it first using php artisan migrate:install then you can do php artisan migrate:make create_navlinks_table or whatever
* Euan T states you then run the migrations using php artisan migrate