namespaces refactoring part 2

This commit is contained in:
Peter Papp
2021-07-18 18:05:33 +02:00
parent 8f77a497b5
commit 54dc57fcbf
107 changed files with 310 additions and 279 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace Domain\Invoices\Resources;
use Illuminate\Http\Resources\Json\ResourceCollection;
class InvoiceCollection extends ResourceCollection
{
public $collects = InvoiceResource::class;
/**
* Transform the resource collection into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'data' => $this->collection,
];
}
}