FEATURE: add page ordering

This commit is contained in:
Michal Kváček
2017-09-13 14:02:07 +02:00
parent d90ca08ba6
commit 3fdae2669b
13 changed files with 293 additions and 215 deletions
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddOrderToContent extends Migration
{
/**
* Run the migrations.
* @return void
*/
public function up()
{
Schema::table('contents', function (Blueprint $table) {
$table->integer('order')
->after('viewed')
->default(0);
});
}
/**
* Reverse the migrations.
* @return void
*/
public function down()
{
Schema::table('contents', function (Blueprint $table) {
$table->dropColumn('order');
});
}
}