Skip to content

Commit

Permalink
fix(global): Fix listing issues
Browse files Browse the repository at this point in the history
- Force casting type int for auth->company_id
  • Loading branch information
gnovaro committed Mar 9, 2024
1 parent 0b2be78 commit dcd3cd4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Email/EmailIndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class EmailIndexController extends MainController
public function index(Request $request)
{
$data['emails'] = (new Email())->getAllByCompanyId(
Auth::user()->company_id,
(int) Auth::user()->company_id,
$request->search
);

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Supplier/SupplierIndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SupplierIndexController extends MainController
public function index(Request $request)
{
$supplier = new Supplier();
$data['suppliers'] = $supplier->getAllByCompany(Auth::user()->company_id);
$data['suppliers'] = $supplier->getAllByCompany((int) Auth::user()->company_id);

return view('supplier.index', $data);
}
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Ticket/TicketIndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public function index(Request $request)
$search = $request->query('search');
$ticket = new Ticket();

$data['tickets'] = $ticket->getAllByCompanyId(Auth::user()->company_id, $search);
$data['tickets'] = $ticket->getAllByCompanyId((int) Auth::user()->company_id, $search);
$data['search'] = $search;
$data['customers'] = Customer::whereCompany(Auth::user()->company);
$data['customers'] = Customer::whereCompany((int) Auth::user()->company);

return view('ticket.index', $data);
}
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

const APP_VERSION = '3.7.6';
const APP_VERSION = '3.7.7';

0 comments on commit dcd3cd4

Please sign in to comment.