Download the PHP package watson/nameable without Composer
On this page you can find all versions of the php package watson/nameable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download watson/nameable
More information about watson/nameable
Files in watson/nameable
Package nameable
Short Description Format names of users into full, familiar and abbreviated forms
License MIT
Homepage https://github.com/dwightwatson/nameable
Informations about the package nameable
nameable
This package provides a caster and a formatter class for presenting your user's names. It can get a user's first, last or full name, their initials, and common abbreviations. Instead of separating the fields over a few database columns you can store a user's name in a single column and fetch what you need.
This package is based upon Basecamp's name_of_person
package for Ruby/Rails.
Installation
You can install the package via Composer:
Then use the Nameable
cast for any Eloquent models you want to use as a name.
Alternatively, you can interact with the Name
class directly.
Usage
In addition there are possessive variants you can use which will work correctly with names that end in s
.
If a user doesn't provide a full name (for example, just a first name) the attributes will just omit the last name.
License
The MIT License (MIT). Please see License File for more information.
All versions of nameable with dependencies
illuminate/contracts Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0