panjinamjaelf / kaguya
Save app settings on laravel framework.
Requires
- php: ^7.2.5
- illuminate/support: ^6.0 | ^7.0 | ^8.0
Requires (Dev)
- orchestra/testbench: ^5.0
- phpunit/phpunit: ^8.5
This package is auto-updated.
Last update: 2026-07-06 15:51:09 UTC
README
Laravel package used to store your app settings.
Installation
composer require panjinamjaelf/kaguya
After install the package you should run the kaguya:install artisan command. This command will publish kaguya assets and migrate database.
Configuration
You can configure the available menu on settings with publishing the package configuration
php artisan vendor:publish --tag=kaguya-config
Content of the configuration
| key | default value | Description |
|---|---|---|
| settings | default settings | Configure section of the settings page. |
| path | env('KAGUYA_PATH', 'settings') | This URI path where settings will be accessible from. |
| middleware | ['web', 'auth'] |
Usage
To get setting value from storage
setting('setting_name', 'default');
Set current setting value
setting(['setting_name' => 'value']);
If you want to reset your current settings to default value you can run this command
php artisan kaguya:reset
Add this following script on any view or controller to get settings page url
route('settings');
View
If you want to customize the view you can publish the view with this command
php artisan vendor:publish --tag=kaguya-views
Translation
This package contain translation files, you may run this command to customize the translation.
php artisan vendor:publish --tag=kaguya-translations
License
This project and the Laravel framework are open-sourced software licensed under the MIT license.