bega updates

This commit is contained in:
Mekan1206
2026-07-21 21:30:27 +05:00
parent 6093a45761
commit db94922e9a
22 changed files with 1033 additions and 26 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Http\Controllers\Api\V1\Story\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class StoryResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->whenHas('id'),
'title' => $this->whenHas('title'),
'photo' => $this->photo(),
'thumbnail' => $this->photo('thumb720x1280'),
'expires_at' => $this->expires_at?->toISOString(),
];
}
}