You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Я попробовал, по моему работает, только сейчас при сохранении проблемы. Такое ощущение что он сам пребразовует название поля таблицы. Указал orders как вы и советовали, но поле он ищет orders_id, а меня указано order_id. Как лучше всего поправить.
Всем привет. У меня не получается использовать поле relates
$schema->relates('order_id', 'orders')
Этот код возвращает ошибку
Модели Order, Product
class Order extends Eloquent { public function products() { return $this->hasMany(Product::class); } }
class Product extends Eloquent { public function orders() { return $this->belongsTo(Order::class); } }
В чем может быть проблема?
The text was updated successfully, but these errors were encountered: