I created migration successfully but can't see table in the database, when I go for "PHP artisan migrate" I am facing an error stated:
Base table or view not found: 1146 pakishops.advertisement does not exist.
here is migration code:
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAdvertisementTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('advertisement', function (Blueprint $table) {
$table->increments('id');
$table->integer('shop_id')->unsigned();
$table->foreign('shop_id')
->references('id')
->on('shops')
->onDelete('cascade');
$table->string('image')->default('default.jpg');
$table->datetime('starting_date');
$table->datetime('ending_date');
$table->boolean('is_paid');
$table->boolean('is_active');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('advertisement');
}
}
What should I do to solve this issue?
via Asif Nawaz