Код: Выделить всё
[Illuminate\Database\QueryException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'exercise1.categories' doesn't exist (SQL: select * from
categories[PDOException]
SQLSTATE[42S02]: базовая таблица или представление не найдены: 1146 Таблица «exercision1.categories» не существует >
Потом я остановил Laravel. После этого, когда я запускаю команду php artisan submit для запуска Laravel, я получаю ту же ошибку.
Вот две миграции, которые я откатил:
1.
Код: Выделить всё
class CreateCategoriesTable extends Migration
{
public function up()
{
Schema::create('categories',function (Blueprint $table){
$table->increments('id');
$table->string('name');
$table->text('parent_id');
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('categories');
}
}
Код: Выделить всё
class CreateArticlesTable extends Migration
{
public function up()
{
Schema::create('articles', function (Blueprint $table) {
$table->increments('id');
$table->string('title')->nullable(false);
$table->longText('article')->nullable(false);
$table->integer('user_id')->unsigned();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('articles');
}
}
Подробнее здесь: https://stackoverflow.com/questions/425 ... ound-error
Мобильная версия