Download the PHP package alexusmai/easy-settings without Composer
On this page you can find all versions of the php package alexusmai/easy-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alexusmai/easy-settings
More information about alexusmai/easy-settings
Files in alexusmai/easy-settings
Package easy-settings
Short Description Laravel + Vue - easy settings for your application
License MIT
Homepage https://github.com/alexusami/easy-settings
Informations about the package easy-settings
Easy settings - Laravel + Vue package

The application is designed for convenient and fast work with simple data of your application.
For example, you need to place a phone number in the footer of your site. You can enter it directly into the HTML code, but if you need to change it, you'll have to dig into the code. And if you make a website to a client, then he will not even know how to change this number. Of course you can write your own CRUD's for all items ... or you can just use this package.
This package is suitable for storing such data as:
- strings
- numbers, phone numbers,
- small blocks of text
- Boolean types (true, false) ON / OFF
Also, if you have a multilingual site, then you will also be able to make your work easier, and save the required data in several languages.
Installation
Composer
If you have Laravel 5.4 or earlier version, then add service provider to config/app.php and
add alias.
Publish config file (easy-settings.php)
You can install npm package directly and use it in your vue application - more information about it - laravel-vue-easy-settings
OR
Publish js and css files - laravel-vue-easy-settings package (compiled, minimised)
Run migration -> this command create "easy-settings" table
Settings
Open configuration file - config/easy-settings.php
In 'languages' array you can add the necessary languages
To create and edit groups of settings, you must use the developer mode.
After you have added the necessary groups of settings, disable the developer mode if you do not want users to be able to change the structure, validation rules, delete, etc.
Use caching, this will avoid unnecessary queries to the database
Be sure to add your middleware to restrict access to the application
Open the view file where you want to place the application block, and add:
-
add a csrf token to head block if you did not do it before
-
the package uses some styles of Bootstrap 4, if you already use it, then you do not need to connect any styles. Otherwise add -
-
add js (laravel-vue-easy-settings)
- add div for application
Usage
Now it remains to add the necessary settings groups, add fields, validation rules and can be used in your code.
- If you have chosen 'radios' type, the result will be a boolean type (true or false).
- If "Lang" type is selected, the result will depend on the settings of the language of your application, at the time of the call.
- If the desired language is not found - will be use fallback locale (see config/app.php) or default value.
Seeder
Sometimes you need to roll back the database while developing the project, and the package data will be lost. In order to avoid this, you can run the command
That will generate a seeder (EasySettingsSeeder) that will contain your data, and you will need to add it to your seeders list (database/seeds/DatabaseSeeder.php)