作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试在 laravel 5.2 中触发 Eloquent 查询
Movies_showtimes::with('showdata','movie','cinema')->where(['cinema_id'=>$id,'show_date'=>Carbon::today()])->get();
此查询仅获取今天日期的所有电影放映时间。我想获取今天 >= 的电影放映时间,但我无法在上述查询的 where() 子句中放入 >= 符号。
感谢您的帮助。我试过这样做,但对我没有用
Movies_showtimes::with('showdata','movie','cinema')->where(['cinema_id'=>$id,'show_date','>=',Carbon::today()])->get();
最佳答案
试试这个查询
Movies_showtimes::with('showdata','movie','cinema')->where(
[['cinema_id','=',$id],['show_date','>=',Carbon::today()]]
)->get();
关于php - 如何在 Laravel 5.2 中编写 >= Eloquent 数据库查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39586053/
我是一名优秀的程序员,十分优秀!