2017-25 © Pedro Peláez
 

library laravelsetting

Store your custom Settings in database and cache system

image

aries/laravelsetting

Store your custom Settings in database and cache system

  • Thursday, November 16, 2017
  • by iMohammadd
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Laravel Setting

install via composer, (*1)

composer require aries/laravelsetting, (*2)

Add Service Provider to config/app.php providers array:, (*3)

'providers' => [
    ....
    Aries\LaravelSetting\LaravelSettingServiceProvider::class,
]

And add alias to aliases array:, (*4)

'aliases' => [
    ...
    'Setting' => Aries\LaravelSetting\Facade\Setting::class,
]

And publish vendor, (*5)

php artisan vendor:publish

And migrate database, (*6)

php artisan migrate

Usage, (*7)

<?php
namespace App\Http\Controllers;

use Aries\LaravelSetting\Facade\Setting;

class SettingController extends Controller {
    public function index(){
        #Set Primary Key :
        Setting::set('key', 'value', true);

        #Set a Setting property:
        Setting::set('key', 'value', false, false);

        #Get a Stored Setting value or pass default value
        $setting['key'] = Setting::get('key', 'default value');


        #Get All primary Keys
        $settings = Setting::getPrimary();
    }

    public function store(\Request $request){
        #get all settings from an key-value array and store them to database
        #example: <input type="text" name="setting['title']">
        Setting::store($request->input('setting'));
    }
}

The Versions

16/11 2017

dev-master

9999999-dev

Store your custom Settings in database and cache system

  Sources   Download

MIT

by Mohammad Mohammadi

12/11 2017

0.2.3

0.2.3.0

Store your custom Settings in database and cache system

  Sources   Download

MIT

by Mohammad Mohammadi

12/11 2017

0.2.2

0.2.2.0

Store your custom Settings in database and cache system

  Sources   Download

MIT

by Mohammad Mohammadi

11/11 2017

0.2.1

0.2.1.0

Store your custom Settings in database and cache system

  Sources   Download

MIT

by Mohammad Mohammadi

10/11 2017

0.1.1

0.1.1.0

Store your custom Settings in database and cache system

  Sources   Download

MIT

by Mohammad Mohammadi