Created
March 4, 2015 13:21
-
-
Save ziyahan/57e038e6e87030d6b9c4 to your computer and use it in GitHub Desktop.
Role migration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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