BC21 module Bill & Invoice controller fixed :)
This commit is contained in:
parent
0b7e7b0203
commit
b7d35b47e7
@ -27,13 +27,13 @@ class Bills extends ApiController
|
|||||||
/**
|
/**
|
||||||
* Display the specified resource.
|
* Display the specified resource.
|
||||||
*
|
*
|
||||||
* @param Document $document
|
* @param Document $bill
|
||||||
*
|
*
|
||||||
* @return \Dingo\Api\Http\Response
|
* @return \Dingo\Api\Http\Response
|
||||||
*/
|
*/
|
||||||
public function show(Document $document)
|
public function show(Document $bill)
|
||||||
{
|
{
|
||||||
return $this->response->item($document, new Transformer());
|
return $this->response->item($bill, new Transformer());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,29 +53,29 @@ class Bills extends ApiController
|
|||||||
/**
|
/**
|
||||||
* Update the specified resource in storage.
|
* Update the specified resource in storage.
|
||||||
*
|
*
|
||||||
* @param $document
|
* @param $bill
|
||||||
* @param $request
|
* @param $request
|
||||||
*
|
*
|
||||||
* @return \Dingo\Api\Http\Response
|
* @return \Dingo\Api\Http\Response
|
||||||
*/
|
*/
|
||||||
public function update(Document $document, Request $request)
|
public function update(Document $bill, Request $request)
|
||||||
{
|
{
|
||||||
$document = $this->dispatch(new UpdateDocument($document, $request));
|
$bill = $this->dispatch(new UpdateDocument($bill, $request));
|
||||||
|
|
||||||
return $this->item($document->fresh(), new Transformer());
|
return $this->item($bill->fresh(), new Transformer());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the specified resource from storage.
|
* Remove the specified resource from storage.
|
||||||
*
|
*
|
||||||
* @param Document $document
|
* @param Document $bill
|
||||||
*
|
*
|
||||||
* @return \Dingo\Api\Http\Response
|
* @return \Dingo\Api\Http\Response
|
||||||
*/
|
*/
|
||||||
public function destroy(Document $document)
|
public function destroy(Document $bill)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->dispatch(new DeleteDocument($document));
|
$this->dispatch(new DeleteDocument($bill));
|
||||||
|
|
||||||
return $this->response->noContent();
|
return $this->response->noContent();
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
|
@ -59,29 +59,29 @@ class Invoices extends ApiController
|
|||||||
/**
|
/**
|
||||||
* Update the specified resource in storage.
|
* Update the specified resource in storage.
|
||||||
*
|
*
|
||||||
* @param $document
|
* @param $invoice
|
||||||
* @param $request
|
* @param $request
|
||||||
*
|
*
|
||||||
* @return \Dingo\Api\Http\Response
|
* @return \Dingo\Api\Http\Response
|
||||||
*/
|
*/
|
||||||
public function update(Document $document, Request $request)
|
public function update(Document $invoice, Request $request)
|
||||||
{
|
{
|
||||||
$document = $this->dispatch(new UpdateDocument($document, $request));
|
$invoice = $this->dispatch(new UpdateDocument($invoice, $request));
|
||||||
|
|
||||||
return $this->response->item($document->fresh(), new Transformer());
|
return $this->response->item($invoice->fresh(), new Transformer());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the specified resource from storage.
|
* Remove the specified resource from storage.
|
||||||
*
|
*
|
||||||
* @param Document $document
|
* @param Document $invoice
|
||||||
*
|
*
|
||||||
* @return \Dingo\Api\Http\Response
|
* @return \Dingo\Api\Http\Response
|
||||||
*/
|
*/
|
||||||
public function destroy(Document $document)
|
public function destroy(Document $invoice)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->dispatch(new DeleteDocument($document));
|
$this->dispatch(new DeleteDocument($invoice));
|
||||||
|
|
||||||
return $this->response->noContent();
|
return $this->response->noContent();
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user