kamekun / kame-settings
Settings Module for KaMe a simple laravel CMS
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:package
Requires
- php: ^7.3|^8.0
- illuminate/support: ^8.0
- livewire/livewire: 2.*
Requires (Dev)
- laravel/framework: ^7.0|^8.0
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-03-29 04:33:28 UTC
README
This package provides the settings module for the KAME, a simple cms made with laravel, livewire and tailwind.
Requirements
PHP >= 7.3|8.0
Laravel >=7.X
Installation
Install via composer:
composer require kamekun/kame-settings
Publish
Publish config file.
php artisan vendor:publish --tag="Kamekun\\KameSettings\\KameSettingsServiceProvider"
Configure
You can change the options of your app from config/kame-settings.php
file
Database
Create table for database Model
php artisan migrate
Facade
// Parameters: key, value Setting::get('foo', 'default'); // Parameters: key, value, readOnly (optional, default false) Setting::set('foo', 'default', true); // Note: (ReadOnly attributes are for properties/configuration that shouldn't delete from the backend panel)
Blade Directive
You can get the settings directly in your blade templates using the helper method or the blade directive like @setting('foo')
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
I am open to contributions to this package, and will do the best I can to maintain it over time. Pull requests are welcome, and in fact encouraged. Right now there are no specific guidelines for a PR.
Road Map
Some considerations for future versions:
- Add Support for caching Settings
- Add support for save / read settings from json file
Credits and License
-
Taylor Otwell and co. for Laravel
-
Caleb Porzio for livewire
-
Adam Wathan for Tailwind labs
This project is licensed under the MIT License - see the License File for details