Я указал имя таблицы в классе модели.Laravel 5.6, PHP 7
namespace App;
use Illuminate\Database\Eloquent\Model;
class SizeProduct extends Model
{
protected $table = 'size_product';
protected $fillable = ['product_id', 'size_id'];
}
Это моя миграция:
class CreateSizeProductTable extends Migration
{
public function up()
{
Schema::create('size_product', function (Blueprint $table) {
//some code here
});
}
public function down()
{
Schema::dropIfExists('size_product');
}
Но я все еще получаю эту ошибку:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db_name.product_size' doesn't exist