replace url to route

This commit is contained in:
Cüneyt Şentürk
2020-08-11 16:52:10 +03:00
parent deee58af52
commit 10bd79ad7a
28 changed files with 41 additions and 35 deletions

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -64,8 +64,9 @@ class Search extends Controller
'href' => route('invoices.show', $invoice->id),
];
}
}/*
}
/*
$income_transactions = Transaction::income()->usingSearchString($keyword)->get();
if ($income_transactions->count()) {
@ -78,7 +79,8 @@ class Search extends Controller
'href' => url('sales/revenues/' . $transaction->id),
];
}
}*/
}
*/
$customers = Contact::customer()->enabled()->usingSearchString($search->keyword)->get();
@ -107,7 +109,8 @@ class Search extends Controller
];
}
}
/*
/*
$payments = Transaction::expense()->usingSearchString($keyword)->get();
if ($revenues->count()) {
@ -120,7 +123,8 @@ class Search extends Controller
'href' => url('sales/revenues/' . $revenue->id),
];
}
}*/
}
*/
$vendors = Contact::vendor()->enabled()->usingSearchString($search->keyword)->get();