【发布时间】:2014-07-21 04:01:34
【问题描述】:
假设我有以下模型:
class Movie extends Eloquent
{
public function director()
{
return $this->belongsTo('Director');
}
}
现在我想使用基于 director 表中的列的 where 条件来获取电影。
有没有办法做到这一点?找不到任何关于基于属于关系的条件的文档。
【问题讨论】:
标签: laravel where eloquent belongs-to