php-enum
Simple and fast implementation of enumerations with native PHP (by marc-mabe)
laravel-enum
Simple, extensible and powerful enumeration implementation for Laravel. (by BenSampo)
php-enum | laravel-enum | |
---|---|---|
1 | 3 | |
462 | 1,971 | |
- | - | |
0.0 | 6.9 | |
7 months ago | about 2 months ago | |
PHP | PHP | |
BSD 3-clause "New" or "Revised" License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
php-enum
Posts with mentions or reviews of php-enum.
We have used some of these posts to build our list of alternatives
and similar projects.
-
[RFC] Voting on enums will start next week, any last minute feedback?
Now I'm thinking there will be a need for Rectors to convert existing enum libraries into these (I've been using marc-mabe/php-enum).
laravel-enum
Posts with mentions or reviews of laravel-enum.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-02-08.
-
How to Use Laravel Rules
Suppose we have a Permission enum in our Laravel project, and when an admin assigns a permission to a user, we need to verify if the permission is valid. To accomplish this, we'll create the Permission enum using BenSampo/laravel-enum package:
-
Laravel enum tips!!
About Laravel Enum
-
Suggestions for improvement to lookup table
I use this laravel-enum package, Spatie has one that I'm sure is great as well. Have you checked out how they do things to see if there are any takeaways? They're a different approach because the list of enums aren't stored in the database, which I really like because it means I can get the enum types and values autocompleted in my IDE. There are also some convenient features like attribute casting and validation rules.
What are some alternatives?
When comparing php-enum and laravel-enum you can also consider the following projects:
php-enum - The enum PHP is missing, inspired from SplEnum
sushi - Eloquent's missing "array" driver.
map - PHP arrays and collections made easy
enum - Strongly typed enums in PHP supporting autocompletion and refactoring
Symfony - The Symfony PHP framework
laravel-mysql-spatial - MySQL Spatial Data Extension integration with Laravel.
DoctrineEnumBundle - 📦 Provides support of ENUM type for Doctrine in Symfony applications.
laravel-fpdf - Create PDFs with Laravel, provides FPDF version 1.86
enum-concern - A PHP package for effortless Enumeration handling with Laravel Collections 📦 ✨
bouncer - Laravel Eloquent roles and abilities.