PHP Package: spatie/laravel-enum

Spatie's Laravel Enum package simplifies working with enumerations in Laravel and PHP applications, providing type-safe and human-readable enums for your codebase.

Current Version: 3.2.0
Last Updated: 2025-02-25
PHP Requirement: ^8.0
Dependencies: None

Package Description

Laravel Enum by Spatie is a comprehensive library designed to enhance your Laravel and PHP projects by offering a robust and efficient way to handle enumerations. With this package, you can streamline your codebase, ensure type safety, and improve the readability of your enums effortlessly.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 3.2.0

Download Download v3.2.0

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com

require_once 'libs/spatie/laravel-enum/3.2.0/loader.php';
use Spatie\Enum\Enum;

$obj = new Enum();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.