Download the PHP package lucastuzina/laranums without Composer

On this page you can find all versions of the php package lucastuzina/laranums. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laranums

Laranums

Laranums is a Laravel package that turns PHP enums into a first-class, fully-featured domain primitive. One trait unlocks lookup, conversion, translations, attribute-driven UI metadata, navigation, filtering, comparison, ordering and more.

Packagist Downloads Version License

Installation

Quickstart

Drop the Laranum trait into any enum:

Documentation

Full docs live in the docs/ directory:

Feature Overview

Case Attributes

Attach UI metadata directly to cases — no match statements, no framework lock-in.

→ Full details

Method Cheatsheet

Concern Methods
Lookup fromName, fromValue, fromNameOrDefault, fromValueOrDefault, isValidName, isValidValue
Metadata className
Conversion toArray, toArrayReversed, names, values, collect
Translations trans, transNames, transValues
Attributes label, color, icon, description, toSelectOptions
Navigation first, last, count, at, index, next, previous
Filtering only, except, rand, random
Comparison is, in, notIn
Ordering compare, lessThan, greaterThan, between
JSON jsonSerialize
Validation rule, ruleOnly, ruleExcept

→ Full reference

Utility Enums

Ready-to-use, domain-neutral enums that ship with the full Laranum trait baked in.

Enum Purpose
Unit Length, weight, time, speed, temperature, … with built-in conversion.
HttpStatus IANA status codes with category helpers (isSuccess, isClientError, …).
HttpMethod isSafe, isIdempotent, hasRequestBody per RFC 7231.
Day ISO-8601 weekdays with isWeekday, isWeekend, short.
Month Leap-year-aware daysInMonth, quarter, short.
Quarter months(), firstMonth(), lastMonth().
Season Meteorological seasons with hemisphere support.
CardinalDirection 8-point compass with degrees, opposite, fromDegrees.
Continent Seven-continent model with ISO codes.
Currency ISO 4217 (~150 codes) with symbol, decimals, format.
Country All 249 ISO 3166-1 countries with alpha3, numeric, dialCode, continent, flag.
Language ISO 639-1 (~180 codes) with nativeName, isRtl.

→ Full details

Laravel Integration

→ Full details

Artisan Command

Scaffolds the enum and optional translation stubs under lang/{locale}/enums.php.

→ Full details

À la carte

If you don't want the whole trait, compose your own from the concerns under Lucastuzina\Laranums\Concerns\*:

License

This package is open-sourced software licensed under the MIT license.


All versions of laranums with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lucastuzina/laranums contains the following files

Loading the files please wait ...