mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
query first go
This commit is contained in:
parent
232fad0145
commit
e3ef737ac4
|
@ -694,6 +694,14 @@ class ReportsController extends Controller
|
|||
$checkout_end = \Carbon::parse($request->input('checkout_date_end'))->endOfDay();
|
||||
|
||||
$assets->whereBetween('assets.last_checkout', [$checkout_start, $checkout_end]);
|
||||
|
||||
$actionlogassets = Actionlog::where('action_type','=', 'checkout')->
|
||||
where('item_type' 'LIKE' '%Asset%',)
|
||||
whereBetween('created_at',[$checkout_start, $checkout_end])
|
||||
->pluck('item_id');
|
||||
|
||||
$assets->whereIn('id',$actionlogassets);
|
||||
|
||||
//$assets->whereBetween('action_logs.created_at', [$checkout_start, $checkout_end]);
|
||||
//action_logs bit was returning an ERR_INVALID_RESPONSE so I probably missed something
|
||||
//sql query? -> WHERE (`action_type` = 'checkout') AND (`item_type` LIKE '%Asset%')
|
||||
|
|
Loading…
Reference in a new issue