Laravel Enum

screenshot of Laravel Enum
laravel

Simple, extensible and powerful enumeration implementation for Laravel.

Overview

Laravel Enum is a simple, extensible, and powerful enumeration implementation for Laravel. It provides a full suite of features for handling enums, making it a useful tool for developers using PHP 8.1 or higher and Laravel 9 or 10.

Features

  • Enum key value pairs as class constants: Organize enums using class constants.
  • Full-featured suite of methods: Includes a range of methods for enum manipulation.
  • Enum instantiation: Easily instantiate enums.
  • Flagged/Bitwise enums: Support for flagged or bitwise enums.
  • Type hinting: Benefit from type hinting with enums.
  • Attribute casting: Ability to cast enum values as attributes.
  • Validation rules: Easily validate enum keys or values as input parameters.
  • Localization support: Localization capabilities for enums.
laravel
Laravel

Laravel is a powerful and elegant PHP framework that provides developers with a comprehensive set of tools and features to build robust web applications. It follows the Model-View-Controller (MVC) architectural pattern, offering a clean and organized structure for writing efficient and maintainable code.