Schema / Migration in Laravel


php artisan make:migration add_id_city_in_restaturant


 add new column or update

  public function up()
    {
       Schema::table('restaurants', function (Blueprint $table) {
           
            $table->integer('city_id');
            $table->integer('status_id')->default(1);
            $table->increments('id');
            $table->integer('user_id');
            $table->integer('restaurant_type');                   
            $table->string('restaurant_name');
            $table->string('restaurant_slug')->nullable();
            $table->longtext('restaurant_description');
            $table->text('restaurant_address');
            $table->text('delivery_charge')->nullable();
            $table->string('restaurant_logo')->nullable();          
            $table->string('restaurant_bg')->nullable();
            $table->string('open_monday')->nullable();
            $table->string('open_tuesday')->nullable();
            $table->string('open_wednesday')->nullable();
            $table->string('open_thursday')->nullable();
            $table->string('open_friday')->nullable();
            $table->string('open_saturday')->nullable();
            $table->string('open_sunday')->nullable();           
            $table->integer('review_avg')->nullable();


           
        });
    }

Comments

Popular Posts