Download the PHP package surya/laravel-settings without Composer

On this page you can find all versions of the php package surya/laravel-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-settings

Laravel Settings

A laravel package for manage your app settings


Installation

This package require laravel 5.5 or higher, if your current version of laravel is below 5.5 you could install this package but it isn't tested at all.

Register the ServiceProvider in config/app.php

Also register the Facade Alias

Publish migration table

Migrate

Usage

By default the folder that use for store our setting is located in resources/settings, so you must create settings folder by your self.

Creating Setting File

Let's create setting file call general.php

the filename of setting also refer to group, used for getting setting value and prop the setting file only containts an array of setting properties. the site_name is the key of the setting.

available setting properties:

  1. type => the type of the setting, basically the input tag e.g: text, textarea, select, number, etc.
  2. default => the default value of the setting.
  3. label => the setting label.
  4. options => this specific for type select and radio only.

Rendering Setting File

After the setting file was created. You can render the setting file by using blade directive

the @rendersettings directive doesn't include the form tag, so you should render your setting between form tag

All the setting type are bootstrap friendly so it will adapt to your bootstrap theme.

Saving Your Setting

You can simply use facade to saving settings

Play With Value

Getting Setting Value


There's three diffrent ways to getting setting value. use the directive

use the helper function

use the facade class

getting setting propperty


or

checking if setting exists

or

Modify Setting Type

You still has control for modify each of setting type or adding new setting type.

publish setting types view

as you can see in resources/view/vendor/setting/settings each setting type view has exact name of type property, so if you want additional setting type just add another view file.

for example if you want create setting that accept email

all properties for each setting key are automatically passed. save as email.blade.php and it's automatically recognized as email setting type.

New In 1.2.+

You can now add resource key for select setting type

for example, if you want select a primary user from database

There are 3 new keys, source is the model source show_label model property key if your model primary key is id just leave it empty.

currently the source key only work for select setting type

New in 1.2.1

New switch setting type.

in order to use switch use must include bootstrap otherwise you will get normal checkbox input

Now the setting type check can use options key


All versions of laravel-settings with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
illuminate/container Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0|~6.0.0
illuminate/database Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0|~6.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package surya/laravel-settings contains the following files

Loading the files please wait ....