Download the PHP package amirkacem/model-key-factory without Composer
On this page you can find all versions of the php package amirkacem/model-key-factory. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download amirkacem/model-key-factory
More information about amirkacem/model-key-factory
Files in amirkacem/model-key-factory
Download amirkacem/model-key-factory
More information about amirkacem/model-key-factory
Files in amirkacem/model-key-factory
Vendor amirkacem
Package model-key-factory
Short Description A simple package to generate Eloquent Model Keys
License MIT
Homepage https://github.com/amirKacem/model-key-factory.git
Package model-key-factory
Short Description A simple package to generate Eloquent Model Keys
License MIT
Homepage https://github.com/amirKacem/model-key-factory.git
Keywords laravelmodel-key-factory
Please rate this library. Is it a good library?
Informations about the package model-key-factory
A simple package to generate Eloquent Model Keys
Installation
You can publish the config file with:
This is the contents of the published config file:
Usage
This is a very simple to use package. There are two available methods to generate the key:
Using the Key Factory
Using the Str helper
Test
Eloquent Integration
There is an eloquent model trait available to use called HasKey which will:
When you are creating an eloquent model, the trait will be booted. It will get the first 3 characters of the Model name, force them to lowercase and append a "_" and use this as the prefix for the Key Factory
All versions of model-key-factory with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.0
spatie/laravel-package-tools Version ^1.4.3
illuminate/contracts Version ^9.0
spatie/laravel-package-tools Version ^1.4.3
illuminate/contracts Version ^9.0
The package amirkacem/model-key-factory contains the following files
Loading the files please wait ...