replace url to route
This commit is contained in:
@ -45,7 +45,7 @@ class Permissions extends ApiController
|
||||
{
|
||||
$permission = $this->dispatch(new CreatePermission($request));
|
||||
|
||||
return $this->response->created(url('api/permissions/' . $permission->id));
|
||||
return $this->response->created(route('api.permissions.show', $permission->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Roles extends ApiController
|
||||
{
|
||||
$role = $this->dispatch(new CreateRole($request));
|
||||
|
||||
return $this->response->created(url('api/roles/' . $role->id));
|
||||
return $this->response->created(route('api.roles.show', $role->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ class Users extends ApiController
|
||||
{
|
||||
$user = $this->dispatch(new CreateUser($request));
|
||||
|
||||
return $this->response->created(url('api/users/' . $user->id));
|
||||
return $this->response->created(route('api.users.show', $user->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ class Accounts extends ApiController
|
||||
{
|
||||
$account = $this->dispatch(new CreateAccount($request));
|
||||
|
||||
return $this->response->created(url('api/accounts/' . $account->id));
|
||||
return $this->response->created(route('api.accounts.show', $account->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Reconciliations extends ApiController
|
||||
{
|
||||
$reconciliation = $this->dispatch(new CreateReconciliation($request));
|
||||
|
||||
return $this->response->created(url('api/reconciliations/' . $reconciliation->id));
|
||||
return $this->response->created(route('api.reconciliations.show', $reconciliation->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Transactions extends ApiController
|
||||
{
|
||||
$transaction = $this->dispatch(new CreateTransaction($request));
|
||||
|
||||
return $this->response->created(url('api/transactions/' . $transaction->id));
|
||||
return $this->response->created(route('api.transactions.show', $transaction->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -75,7 +75,7 @@ class Transfers extends ApiController
|
||||
{
|
||||
$transfer = $this->dispatch(new CreateTransfer($request));
|
||||
|
||||
return $this->response->created(url('api/transfers/' . $transfer->id));
|
||||
return $this->response->created(route('api.transfers.show', $transfer->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,7 +56,7 @@ class Companies extends ApiController
|
||||
{
|
||||
$company = $this->dispatch(new CreateCompany($request));
|
||||
|
||||
return $this->response->created(url('api/companies/' . $company->id));
|
||||
return $this->response->created(route('api.companies.show', $company->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,7 +67,7 @@ class Contacts extends ApiController
|
||||
{
|
||||
$contact = $this->dispatch(new CreateContact($request));
|
||||
|
||||
return $this->response->created(url('api/contacts/' . $contact->id));
|
||||
return $this->response->created(route('api.contacts.show', $contact->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ class Items extends ApiController
|
||||
{
|
||||
$item = $this->dispatch(new CreateItem($request));
|
||||
|
||||
return $this->response->created(url('api/items/' . $item->id));
|
||||
return $this->response->created(route('api.items.show', $item->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Reports extends ApiController
|
||||
{
|
||||
$report = $this->dispatch(new CreateReport($request));
|
||||
|
||||
return $this->response->created(url('api/reports/' . $report->id));
|
||||
return $this->response->created(route('api.reports.show', $report->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Bills extends ApiController
|
||||
{
|
||||
$bill = $this->dispatch(new CreateBill($request));
|
||||
|
||||
return $this->response->created(url('api/bills/' . $bill->id));
|
||||
return $this->response->created(route('api.bills.show', $bill->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ class Invoices extends ApiController
|
||||
{
|
||||
$invoice = $this->dispatch(new CreateInvoice($request));
|
||||
|
||||
return $this->response->created(url('api/invoices/' . $invoice->id));
|
||||
return $this->response->created(route('api.invoices.show', $invoice->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Categories extends ApiController
|
||||
{
|
||||
$category = $this->dispatch(new CreateCategory($request));
|
||||
|
||||
return $this->response->created(url('api/categories/' . $category->id));
|
||||
return $this->response->created(route('api.categories.show', $category->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ class Currencies extends ApiController
|
||||
{
|
||||
$currency = $this->dispatch(new CreateCurrency($request));
|
||||
|
||||
return $this->response->created(url('api/currencies/' . $currency->id));
|
||||
return $this->response->created(route('api.currencies.show', $currency->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ class Settings extends ApiController
|
||||
{
|
||||
$setting = Setting::create($request->all());
|
||||
|
||||
return $this->response->created(url('api/settings/'.$setting->id));
|
||||
return $this->response->created(route('api.settings.show', $setting->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Taxes extends ApiController
|
||||
{
|
||||
$tax = $this->dispatch(new CreateTax($request));
|
||||
|
||||
return $this->response->created(url('api/taxes/' . $tax->id));
|
||||
return $this->response->created(route('api.taxes.show', $tax->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user