toby/app/Infrastructure/Http/Resources/VacationRequestActivityResource.php
Adrian Hopek d825dd727f
#63 - permissions (#67)
* wip

* fix

* wip

* #63 - permissions

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
2022-03-02 09:52:50 +01:00

23 lines
533 B
PHP

<?php
declare(strict_types=1);
namespace Toby\Infrastructure\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class VacationRequestActivityResource extends JsonResource
{
public static $wrap = null;
public function toArray($request): array
{
return [
"date" => $this->created_at->toDisplayDate(),
"time" => $this->created_at->format("H:i"),
"user" => $this->user ? $this->user->fullName : __("System"),
"state" => $this->to,
];
}
}