If you need an array from a PHP Enum containing name and value, you can use this code:
collect(App\Enum\PostStateEnum::cases())->map(fn($case) => ['name' => $case->name, 'value' => $case->value])->pluck('name', 'value');
If you need other properties from the Enum, change name or value as required.