agregada la opcion de published a los posts

This commit is contained in:
Daniel Cortés
2019-10-17 08:00:53 -03:00
parent 877477503c
commit 2fcbf51071
8 changed files with 49 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePublishedRow extends Migration
{
public function up()
{
Schema::table('posts', function (Blueprint $table) {
$table->boolean('is_published')
->after('md')
->default(false);
});
}
public function down()
{
Schema::table('posts', function (Blueprint $table) {
$table->dropColumn('is_published');
});
}
}