Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何将laravel orm更改为我的查询_Php_Mysql_Laravel_Orm - Fatal编程技术网

Php 如何将laravel orm更改为我的查询

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

我在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 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)