replace url to route
This commit is contained in:
@ -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