Downloads
Stars
Version
Registry package provides a convenient way to manage and use simple key/value pairs (with pre-defined types) by using Laravel's under-laying config() functionality.
When application boots, registry entries are saved into Laravel's config so no registry calls will hit the database beyond that point.
The main difference is that keys/values are saved in database and there is no need to manually edit config files.
Take a look at contributing.md to see a to do list.
Requires:
Via Composer:
$ composer require linuxstreet/laravel-registry
Migrate your database:
$ php artisan migrate
If you're using Laravel 5.5 you'll need to add the service provider to your config/app.php
'Linuxstreet\Registry\RegistryServiceProvider::class'
You can publish config and view files using the artisan command:
$ php artisan vendor:publish --provider="Linuxstreet\Registry\RegistryServiceProvider"
Check the 'config/registry.php' config file and make necessary changes if needed.
You can add/edit registry entries by using web provided web forms.
Start your web server:
$ php artisan serve
Go to: http://127.0.0.1:8000/admin/registry
Note: You can customize admin path by changing 'route_prefix' and/or 'path' options in 'config/registry.php'
Console helpers
$ php artisan registry:list
$ php artisan registry:config
$ php artisan registry:flush
Using registry items in your code
You can access registry entries by using provided registry() helper:
registry('key', 'default');
or using Registry facade:
Registry::get('key', 'default');
or using Laravel config() helper:
config('registry.key', 'default');
Please see the changelog for more information on what has changed recently.
$ phpunit
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email author email instead of using the issue tracker.
Please see the license file for more information.