Download the PHP package vildanbina/laravel-js-settings without Composer
On this page you can find all versions of the php package vildanbina/laravel-js-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vildanbina/laravel-js-settings
More information about vildanbina/laravel-js-settings
Files in vildanbina/laravel-js-settings
Package laravel-js-settings
Short Description Laravel Settings in JavaScript
License MIT
Homepage https://github.com/vildanbina/laravel-js-settings
Informations about the package laravel-js-settings
This package convert all your setting key and values who generated (oriceon/laravel-settings
) from your Laravel app to JavaScript with a small library to interact with those settings following a very similar syntax you are familiar with.
Features
- Support Laravel 5+.
- Allow to specify desired wildcard keys who will not converted to JS.
- Settings will generated by package:
oriceon/laravel-settings
Installation
In your Laravel app go to config/app.php
and add the following service provider:
Usage
The Laravel-JS-Settings
package provides a command that generate the JavaScript version of all your settings. The resulting JavaScript file will contain all your settings.
Generating JS settings
Specifying a custom target
Compressing the JS file
Output a JSON file instead.
Configuration
First, publish the default package's configuration file running:
The configuration will be published to config/settings-js.php
.
You may edit this file to define the setting key you exclude in your Javascript code. Just edit the exclude_keys
array in the config file.
Documentation
This is a quick documentation regarding this package
Getting a setting
Getting a setting with default value
Checking if a setting key exists
Prerequisites:
You will need to have installed the following softwares.
- Composer.
- PHP 7+.
Development setup
After getting all the required softwares you may run the following commands to get everything ready:
- Install PHP dependencies:
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please e-mail [email protected] to report any security vulnerabilities instead of the issue tracker.
Credits
- Vildan Bina
- All Contributors
License
The MIT License (MIT). Please see License File for more information.