removed extra brackets
This commit is contained in:
@ -19,7 +19,7 @@ class Users extends ApiController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$users = User::with(['companies', 'roles', 'permissions'])->collect();
|
||||
$users = User::with('companies', 'permissions', 'roles')->collect();
|
||||
|
||||
return $this->response->paginator($users, new Transformer());
|
||||
}
|
||||
@ -34,9 +34,9 @@ class Users extends ApiController
|
||||
{
|
||||
// Check if we're querying by id or email
|
||||
if (is_numeric($id)) {
|
||||
$user = User::with(['companies', 'roles', 'permissions'])->find($id);
|
||||
$user = User::with('companies', 'permissions', 'roles')->find($id);
|
||||
} else {
|
||||
$user = User::with(['companies', 'roles', 'permissions'])->where('email', $id)->first();
|
||||
$user = User::with('companies', 'permissions', 'roles')->where('email', $id)->first();
|
||||
}
|
||||
|
||||
return $this->response->item($user, new Transformer());
|
||||
|
@ -19,7 +19,7 @@ class Reconciliations extends ApiController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$items = Reconciliation::with(['account'])->collect();
|
||||
$items = Reconciliation::with('account')->collect();
|
||||
|
||||
return $this->response->paginator($items, new Transformer());
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class Transactions extends ApiController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$transactions = Transaction::with(['account', 'category', 'contact'])->collect(['paid_at'=> 'desc']);
|
||||
$transactions = Transaction::with('account', 'category', 'contact')->collect(['paid_at'=> 'desc']);
|
||||
|
||||
return $this->response->paginator($transactions, new Transformer());
|
||||
}
|
||||
|
@ -19,9 +19,9 @@ class Transfers extends ApiController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$transfers = Transfer::with([
|
||||
$transfers = Transfer::with(
|
||||
'expense_transaction', 'expense_transaction.account', 'income_transaction', 'income_transaction.account'
|
||||
])->collect('expense_transaction.paid_at');
|
||||
)->collect('expense_transaction.paid_at');
|
||||
|
||||
$special_key = [
|
||||
'expense_transaction.name' => 'from_account',
|
||||
|
@ -22,7 +22,7 @@ class Items extends ApiController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$items = Item::with(['category', 'tax'])->collect();
|
||||
$items = Item::with('category', 'tax')->collect();
|
||||
|
||||
return $this->response->paginator($items, new Transformer());
|
||||
}
|
||||
@ -35,7 +35,7 @@ class Items extends ApiController
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$item = Item::with(['category', 'tax'])->find($id);
|
||||
$item = Item::with('category', 'tax')->find($id);
|
||||
|
||||
return $this->response->item($item, new Transformer());
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class Bills extends ApiController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$bills = Bill::with(['contact', 'items', 'transactions', 'histories'])->collect(['billed_at'=> 'desc']);
|
||||
$bills = Bill::with('contact', 'histories', 'items', 'transactions')->collect(['billed_at'=> 'desc']);
|
||||
|
||||
return $this->response->paginator($bills, new Transformer());
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class Invoices extends ApiController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$invoices = Invoice::with(['contact', 'items', 'transactions', 'histories'])->collect(['invoiced_at'=> 'desc']);
|
||||
$invoices = Invoice::with('contact', 'histories', 'items', 'transactions')->collect(['invoiced_at'=> 'desc']);
|
||||
|
||||
return $this->response->paginator($invoices, new Transformer());
|
||||
}
|
||||
|
Reference in New Issue
Block a user