Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Php Simple Enum

Php Simple Enum Laravel Package

chadsikorra/php-simple-enum

A lightweight, dependency-free enum implementation for PHP. Define constant sets with helper methods for validation, value lookup, and comparison, useful where native enums aren't available. Simple API that's easy to drop into existing projects.

Deep Wiki
Context7

chadsikorra/php-simple-enum is a lightweight PHP package that brings clean, type-safe enum support to projects that can't rely on native PHP enums. Define your allowed values once as class constants, then validate and compare against them without scattered magic strings or repetitive conditional checks.

It stays deliberately minimal: no dependencies, no configuration, and no ceremony. Just extend the base class, declare your constants, and get straightforward helpers for checking and enumerating valid values—ideal for older codebases or anywhere a full enum implementation would be overkill.

  • Define enums as simple class constants—no boilerplate
  • Validate arbitrary values against a defined set
  • Retrieve all valid values for use in forms or validation rules
  • Zero dependencies and no configuration required
  • Drop-in friendly for legacy or pre-8.1 PHP projects
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource