Skip to content

Instantly share code, notes, and snippets.

@ziyahan
Created March 4, 2015 13:21
Show Gist options
  • Save ziyahan/57e038e6e87030d6b9c4 to your computer and use it in GitHub Desktop.
Save ziyahan/57e038e6e87030d6b9c4 to your computer and use it in GitHub Desktop.
Role migration
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRolesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('roles', function(Blueprint $table)
{
$table->increments('id');
$table->integer("parent")->default(0);
$table->string('role_title');
$table->string('role_slug');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('roles');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment