Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- public function up()
- {
- Schema::create('categories', function (Blueprint $table){
- $table->increments('id');
- $table->string('slug')->nullable();
- $table->string('old_redirect')->nullable();
- $table->string('name')->nullable();
- $table->string('short_desc')->nullable();
- $table->text('full_desc')->nullable();
- $table->string('img_sm')->nullable();
- $table->string('img_md')->nullable();
- $table->string('img_lg')->nullable();
- $table->unsignedTinyInteger('priority');
- $table->unsignedTinyInteger('type');
- $table->boolean('active')->default(true);
- $table->timestamps();
- NestedSet::columns($table);
- $table->unique(['parent_id', 'slug']);
- });
- }
- public function down()
- {
- Schema::table('categories', function (Blueprint $table) {
- NestedSet::dropColumns($table);
- });
- Schema::dropIfExists('categories');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement