Download the PHP package rawaby88/muid without Composer

On this page you can find all versions of the php package rawaby88/muid. 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 muid

Laravel Model unique identifier (MUID)

Latest Version on Packagist GitHub Actions

Laravel package to generate a random ID with your prefix for your Eloquent models

Example

Eloquent MUID

Available 3 lengths of Muid

MUID Char count
tiny 16 char
small 24 char
standard 36 char

the length can be altered from the config file if you wish.

Laravel Package
v8.* v1.*
v9.* v2.*
v10.* v3.*

Installation

You can install the package via Composer:

Usage

You can extend the provided model classes, or by using a trait

Extending model

When creating an Eloquent model, instead of extending the standard Laravel model class, extend from the model class provided by this package:

Extending user model

Extending the User class provided by this package:

Using trait

As an alternative to extending the classes in the examples above, you also have the ability to use the provided trait instead

prefix

in order to generate the prefix for your muid, you will need to provide this information in the model itself by adding $keyPrefix, if no prefix provided muid will be generated without prefix

Creating models

In addition to the make:model artisan command, you will now have access to muid:make:model which has all the functionality of the standard make:model command (with the exception of not being able to create a pivot model):

Database migration

This package includes all types to generate your MUID in an easy way

lists of available Blueprints:

Blueprint Size Description
standard
primaryMuid 36 Create a new muid column as the primary key(s) for the table
muid 36 Create a new muid column on the table
foreignMuid 36 Create a new muid column on the table with a foreign key constraint
muidMorphs 36 Add the proper columns for a polymorphic table using MUIDs
nullableMuidMorphs 36 Add nullable columns for a polymorphic table using MUIDs
small
primarySmallMuid 24 Create a new muid column as the primary key(s) for the table
smallMuid 24 Create a new muid column on the table
foreignSmallMuid 24 Create a new muid column on the table with a foreign key constraint
muidSmallMorphs 24 Add the proper columns for a polymorphic table using MUIDs
nullableSmallMuidMorphs 24 Add nullable columns for a polymorphic table using MUIDs
tiny
primaryTinyMuid 16 Create a new muid column as the primary key(s) for the table
tinyMuid 16 Create a new muid column on the table
foreignTinyMuid 16 Create a new muid column on the table with a foreign key constraint
muidTinyMorphs 16 Add the proper columns for a polymorphic table using MUIDs
nullableTinyMuidMorphs 16 Add nullable columns for a polymorphic table using MUIDs

Migration example

Publish Config

Once done, publish the config to your config folder using:

Configuration

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.


All versions of muid with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0 || ^8.1 || ^8.2
doctrine/dbal Version ^4
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 rawaby88/muid contains the following files

Loading the files please wait ....