【发布时间】:2018-10-07 06:39:56
【问题描述】:
我在 Laravel 工作。
- 目前,我在考勤模块工作。
- 我的问题是离职申请,先申请离职
from_date到to_date。 - 接下来,我将通过错误申请相同的日期。
- 和中间日期因错误而应用。这两个条件OK。
- 但我申请在
from_date和to_date之后离开。这个条件 没拍
如何计算这个条件。我下面的代码请检查
$keyWithData = DB::table('leave_allocations')
->select('employee','leave_type','name')
->where('leave_allocations.from_date','<=',$dateS->format('Y-m-d')." 00:00:00")
->where('leave_allocations.to_date','>=',$dateS->format('Y-m-d')." 00:00:00")
->where('leave_allocations.from_date','<=',$dateE)
->where('leave_allocations.to_date','>=',$dateE)
->where('leave_allocations.employee',$empdata->name)
->where('leave_allocations.leave_type',$type)
->first();
谢谢
【问题讨论】:
标签: php laravel laravel-5.5