<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddPopUpContentInSlidersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('sliders', function (Blueprint $table) {
            $table->string('popup_width')->nullable()->after('id');
            $table->boolean('is_popup_img')->nullable()->after('image')->default(1);
            $table->longText('pop_up_content')->nullable()->after('url');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('sliders', function (Blueprint $table) {
            $table->dropColumn('popup_width')->nullable();
            $table->dropColumn('is_popup_img')->nullable();
            $table->dropColumn('pop_up_content')->nullable();

        });
    }
}
