#4 - fix
This commit is contained in:
parent
d7d84a1b30
commit
e883b8c9b7
@ -18,7 +18,7 @@ class UserResource extends JsonResource
|
||||
"avatar" => asset($this->avatar),
|
||||
"trashed" => $this->trashed(),
|
||||
"employmentForm" => $this->employment_form->label(),
|
||||
"employmentDate" => $this->employment_date->translatedFormat("j F Y"),
|
||||
"employmentDate" => $this->employment_date->toDisplayString(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Toby\Providers;
|
||||
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Toby\Models\User;
|
||||
use Toby\Observers\UserObserver;
|
||||
@ -13,5 +14,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
public function boot(): void
|
||||
{
|
||||
User::observe(UserObserver::class);
|
||||
|
||||
Carbon::macro("toDisplayString", fn() => $this->translatedFormat("j F Y"));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user