Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
tipuloidea
/
back
/
app
/
Http
/
Resources
:
NotDistributedPaymentResource.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace App\Http\Resources; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class NotDistributedPaymentResource extends JsonResource { public function toArray(Request $request): array { return [ 'id' => $this->id, 'name' => $this->payment->name, 'payment_id' => $this->payment_id, 'amount' => $this->amount, 'cashbox' => $this->cashbox ?? 0, 'commission' => $this->comission ?? 0, 'article_id' => $this->article_id, 'project_id' => $this->project_id, 'payment_date' => $this->payment->payment_date ?? null, 'payment_type' => $this->payment->payment_type ?? null, ]; } }