|
|
@@ -5,6 +5,7 @@ namespace App\Http\Resources;
|
|
|
use Illuminate\Http\Request;
|
|
|
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
+use Illuminate\Support\Facades\Storage;
|
|
|
|
|
|
class PaymentSplitResource extends JsonResource
|
|
|
{
|
|
|
@@ -46,6 +47,9 @@ class PaymentSplitResource extends JsonResource
|
|
|
'schedule_status' => $schedule?->status,
|
|
|
'schedule_period_type' => $schedule?->period_type,
|
|
|
'client_name' => $schedule?->client?->user?->name,
|
|
|
+ 'client_photo' => $schedule?->client?->profileMedia?->path
|
|
|
+ ? Storage::temporaryUrl($schedule->client->profileMedia->path, now()->addMinutes(60))
|
|
|
+ : null,
|
|
|
|
|
|
'created_at' => $this->created_at?->toISOString(),
|
|
|
'updated_at' => $this->updated_at?->toISOString(),
|