Для этой проблемы выполните следующие шаги:
В PostUsers
Модель определяет имя таблицы
class PostUsers extends Model {
public $table = "post_users";
Обновление:
Не должно
Schema::table('post_users', function (Blueprint $table) {
$table->integer('post_id')->unsigned();
$table->integer('user_id');
$table->foreign('post_id')
->references('id')->on('posts')
->onDelete('cascade')->unsigned()->index();
});
быть
Schema::create('post_users', function (Blueprint $table) {
$table->integer('post_id')->unsigned();
$table->integer('user_id');
$table->foreign('post_id')
->references('id')->on('posts')
->onDelete('cascade')->unsigned()->index();
});
Если вы собираетесь создать новую таблицу, вы должны использовать Schema::create