fixed #3
This commit is contained in:
@ -27,13 +27,11 @@ class Roles extends ApiController
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @param Role $role
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
public function show(Role $role)
|
||||
{
|
||||
$role = Role::with('permissions')->findOrFail($id);
|
||||
|
||||
return $this->response->item($role, new Transformer());
|
||||
}
|
||||
|
||||
|
@ -27,13 +27,11 @@ class Users extends ApiController
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @param User $user
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
public function show(User $user)
|
||||
{
|
||||
$user = User::with(['roles', 'permissions'])->findOrFail($id);
|
||||
|
||||
return $this->response->item($user, new Transformer());
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ class Bills extends ApiController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$bills = Bill::with('bill_statuses')->collect();
|
||||
$bills = Bill::with(['vendor', 'status', 'items', 'payments', 'histories'])->collect();
|
||||
|
||||
return $this->response->paginator($bills, new Transformer());
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class Payments extends ApiController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$payments = Payment::with('account', 'vendor', 'category')->collect();
|
||||
$payments = Payment::with(['account', 'vendor', 'category'])->collect();
|
||||
|
||||
return $this->response->paginator($payments, new Transformer());
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class Invoices extends ApiController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$invoices = Invoice::with('invoice_statuses')->collect();
|
||||
$invoices = Invoice::with(['customer', 'status', 'items', 'payments', 'histories'])->collect();
|
||||
|
||||
return $this->response->paginator($invoices, new Transformer());
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class Revenues extends ApiController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$revenues = Revenue::with('account', 'customer', 'category')->collect();
|
||||
$revenues = Revenue::with(['account', 'customer', 'category'])->collect();
|
||||
|
||||
return $this->response->paginator($revenues, new Transformer());
|
||||
}
|
||||
|
Reference in New Issue
Block a user