Skip to content

Commit

Permalink
Adds Components and Licenses logs to Assets history view
Browse files Browse the repository at this point in the history
  • Loading branch information
inietov committed Feb 1, 2024
1 parent 77fa213 commit 5e4a337
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/Http/Controllers/Api/ReportsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ public function index(Request $request)

if (($request->filled('item_type')) && ($request->filled('item_id'))) {
$actionlogs = $actionlogs->where('item_id', '=', $request->input('item_id'))
->where('item_type', '=', 'App\\Models\\'.ucwords($request->input('item_type')));
->where('item_type', '=', 'App\\Models\\'.ucwords($request->input('item_type')))
->orWhere(function($query) use ($request)
{
$query->where('target_id', '=', $request->input('item_id'))
->where('target_type', '=', 'App\\Models\\'.ucwords($request->input('item_type')));
});
}

if ($request->filled('action_type')) {
Expand Down

0 comments on commit 5e4a337

Please sign in to comment.