Download the PHP package eg-mohamed/model-reference without Composer
On this page you can find all versions of the php package eg-mohamed/model-reference. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eg-mohamed/model-reference
More information about eg-mohamed/model-reference
Files in eg-mohamed/model-reference
Package model-reference
Short Description Easily Generate Reference Number with customization to your model
License MIT
Homepage https://github.com/eg-mohamed/model-reference
Informations about the package model-reference
Laravel Model Reference
This package makes it easy to generate unique reference numbers for your Laravel models.
Installation
-
Install the package via composer:
- Publish the configuration file:
Usage
1. Add the reference column to your migration
Make sure your model's table has a column to store the reference:
2. Use the trait in your model
That's it! Now whenever you create a new record, it will automatically generate a reference:
Customization
You can customize how references are generated by adding properties to your model:
With the settings above, you'd get references like: ORD_12345678_2023
Global Configuration
You can also change the default settings for all models in the config/model-reference.php
file:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Mohamed Said
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of model-reference with dependencies
spatie/laravel-package-tools Version ^1.92.4
illuminate/contracts Version ^10.0||^11.0||^12.0