Download the PHP package ngoubaux/delatbabel-keylists without Composer
On this page you can find all versions of the php package ngoubaux/delatbabel-keylists. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package delatbabel-keylists
keylists
Yeah yeah, you know the drill. Your application needs to have all of these key/value tables. A list of states of the USA. A list of currencies. A table for timezones. A table for staff rotation types. A table for the names of the seven dwarfs (NAME THEM! NOW! QUICK!) (*). A key/value list for each of the 101 dropdowns that you have on the far-too-many forms on your site.
Keylists is a set of database tables and model classes to handle key/value lists in an application in a standard way
So you can now store all of these key/value lists into a single set of tables and cache the whole lot and never have to panic about where to store these things ever again.
Installation
Add these lines to your composer.json file:
Once that is done, run the composer update command:
Alternatively just run this:
Register Service Provider
After composer update completes, add this line to your config/app.php file in the 'providers' array:
Incorporate and Run the Migrations
Finally, incorporate and run the migration scripts to create the database tables as follows:
Sample Data
To load some of the sample data, try adding this line to the $commands array in your app/Console/Kernel.php file:
Then run this command:
This should create entries in the keylists / keyvalues table for the ISO 3166 country codes and names.
Example
I'll get to that. Quit bugging me, K? Just go read the code.
Notes
(*) Happy, Dumpy, Sleepy, Gropey ... umm, hang on, was Gropey one of them?? ... Flopsy, Mopsy and Cottontail.
All versions of delatbabel-keylists with dependencies
ngoubaux/delatbabel-fluents Version ^11.0
guzzlehttp/guzzle Version 7.*
illuminate/database Version ^8.12|^9.0|^10.0|^11.0
illuminate/support Version ^8.12|^9.0|^10.0|^11.0
illuminate/console Version ^8.12|^9.0|^10.0|^11.0