Initial commit: Import existing Laravel project

This commit is contained in:
jeremy bayse
2026-06-15 08:12:33 +02:00
parent 7420d1b466
commit 030d76af53
143 changed files with 21885 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class OrderStatusLogResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'order_id' => $this->order_id,
'user' => [
'id' => $this->user?->id,
'name' => $this->user?->name,
'role' => $this->user?->role,
],
'old_status' => $this->old_status,
'new_status' => $this->new_status,
'changed_at' => $this->changed_at?->format('d/m/Y H:i'),
];
}
}