Download the PHP package solomon-ochepa/laravel-settings without Composer
On this page you can find all versions of the php package solomon-ochepa/laravel-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download solomon-ochepa/laravel-settings
More information about solomon-ochepa/laravel-settings
Files in solomon-ochepa/laravel-settings
Package laravel-settings
Short Description Store settings as key-value pairs in the database.
License MIT
Homepage https://github.com/solomon-ochepa/laravel-settings
Informations about the package laravel-settings
laravel-settings
Store settings as key-value pairs in the database.
All the settings saved in the database are cached to improve performance by reducing SQL queries to zero.
Installation
You can install the package via composer:
Laravel 5.4
If you are installing on Laravel 5.4 or lower, you will need to manually register the Service Provider by adding it to the providers
array and the Facade to the aliases
array in config/app.php
.
In Laravel 5.5 or above, the service provider automatically gets registered, and the Settings
facade will be available immediately.
Get started with Settings::all()
.
Migration
Optionally, you can publish the migration file by running:
Now, run php artisan migrate
to migrate the settings table.
Getting Started
You can utilize the Laravel settings package using either the helper function settings()
or the facade Settings::all()
.
Methods
all()
-- Pass true
to ignore cached settings
get()
Get a specific setting
my()
Get the auth()
user settings.
set()
Set a specific setting
// Set a multiple settings
has()
Check if a setting key exists
remove()
Remove a setting
Groups
You can organize your settings into groups.
If you are upgrading from a previous version, don't forget to run the migration.
Initiate grouping by chaining the group()
method:
Settable for()
Get/set settings for a specific entity
Settable user()
Bind settings to the auth user.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Testing
The package contains some integration/smoke tests, set up with Orchestra. The tests can be run via phpunit.
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
- ...
About "Oki Technologies Ltd"
Oki Technologies, https://www.okitechnologies.com.ng is a dynamic IT firm dedicated to delivering cutting-edge solutions in software development and related services. With a passion for innovation and a commitment to excellence, Oki Technologies leverages the latest technologies and industry best practices to craft tailored solutions that meet the unique needs of each client.
From web and mobile application development to custom software solutions, Oki Technologies offers a comprehensive suite of services designed to empower businesses and organizations across various industries. With a team of skilled professionals, Oki Technologies combines technical expertise with creative insights to deliver high-quality, scalable, and user-friendly software solutions.
At Oki Technologies, we prioritize customer satisfaction and strive to build long-term partnerships with our clients. Our collaborative approach ensures that we understand our clients' goals and objectives, allowing us to deliver solutions that drive tangible results and add value to their businesses.
Whether you're a startup looking to launch a digital product or an established enterprise seeking to optimize your existing software infrastructure, Oki Technologies is your trusted partner for all your software development needs. Let us help you turn your ideas into reality and propel your business to new heights in the digital age.
License
The MIT License (MIT). Please see License File for more information.