Example of Enum in mateusjatenee/crypto-tracker

File app/Models/Account.php (link to Github)
use App\Contracts\HasPositions;
use App\Enums\AccountType;
use Illuminate\Database\Eloquent\Model;

class Account extends Model implements HasPositions
{
    //
    public const TYPES = [
        AccountType::CRYPTO => 'Crypto',
        AccountType::STOCKS => 'Stocks',
        AccountType::CASH => 'Bank'
    ];
    //
}
File app/Http/Livewire/AccountsTable.php (link to Github)
use App\Enums\AccountType;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Livewire\Component;

class AccountsTable extends Component
{
    //
    public array $data = [
        'name' => '',
        'type' => AccountType::STOCKS,
        'currency' => 1
    ];
    //
    public function createAccount()
    {
        Validator::make($this->data, [
            'name' => ['required', 'string'],
            'type' => ['required', Rule::in(Account::TYPES)]
        ]);

        auth()->user()->accounts()->create([
            'name' => $this->data['name'],
            'type' => $this->data['type'],
            'currency_id' => Currency::find($this->data['currency'])->id
        ]);

        return $this->redirect('dashboard');
    }
    //
}
File app/Enums/AccountType.php (link to Github)
class AccountType
{
    const CASH = 'cash';
    const CRYPTO = 'crypto';
    const STOCKS = 'stocks';
}

Additional resources on enum: