Php 如何将laravel orm更改为我的查询
我在laravel orm中查询后有更改。但这不是工作 在sql中Php 如何将laravel orm更改为我的查询,php,mysql,laravel,orm,Php,Mysql,Laravel,Orm,我在laravel orm中查询后有更改。但这不是工作 在sql中 select * from `promotions` join items on items.id = promotions.item_id where promotions.start >= "2014-12-30" and promotions.end <="2015-01-30" select*from`promotions`join items.id=promotions.item\u id where p
select * from `promotions` join items on items.id = promotions.item_id where promotions.start >= "2014-12-30" and promotions.end <="2015-01-30"
select*from`promotions`join items.id=promotions.item\u id where promotions.start>=“2014-12-30”和promotions.end选择('promotions.*,'items.name as i\u name'))
->加入('items','items.id','=','promotions.item_id'))
->其中('start','>=',$start | |'end','第二链where
调用:
->where('start', '>=', $start)
->where('end', '<=', $end)
->其中('start','>=',$start)
->where('end','我也同时使用这两个参数。第一个不合适。但是第二个whereBetween可以,但是我有两个参数start和end@nainglinhtut,然后请Joseph回答。谢谢
->where('start', '>=', $start)
->where('end', '<=', $end)