Skip to content

Instantly share code, notes, and snippets.

@mateusgf
Created August 19, 2014 13:33
Show Gist options
  • Save mateusgf/72fd565b1031ce81a6c1 to your computer and use it in GitHub Desktop.
Save mateusgf/72fd565b1031ce81a6c1 to your computer and use it in GitHub Desktop.
Criar migration das categorias
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCategoriesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('categories', function(Blueprint $table){
$table->increments('id')->unsigned();
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('categories');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment