store invoice profile

This commit is contained in:
Peter Papp
2021-04-28 07:32:40 +02:00
parent e7c4048258
commit bcf14595bf
6 changed files with 221 additions and 1 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace App\Http\Resources\Oasis;
use Illuminate\Http\Resources\Json\JsonResource;
use Laravel\Cashier\Cashier;
class InvoiceProfileResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'data' => [
'id' => $this->id,
'type' => 'invoice-profile',
'attributes' => [
'logo' => $this->logo,
'stamp' => $this->stamp,
'company' => $this->company,
'email' => $this->email,
'ico' => $this->ico,
'dic' => $this->dic,
'ic_dph' => $this->ic_dph,
'registration_notes' => $this->registration_notes,
'author' => $this->author,
'address' => $this->address,
'state' => $this->state,
'city' => $this->city,
'postal_code' => $this->postal_code,
'country' => $this->country,
'phone' => $this->phone,
'bank' => $this->bank,
'iban' => $this->iban,
'swift' => $this->swift,
],
],
];
}
}