• Stars
    star
    105
  • Rank 328,196 (Top 7 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Persistent key-value storage for Laravel, json value supported. l10n supported.

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Persistent Settings Manager for Laravel

  • Simple key-value storage
  • Support multi-level array (dot delimited keys) structure.
  • Localization supported.

Installation

  1. Install package

    composer require unisharp/laravel-settings
  2. Edit config/app.php (Skip this step if you are using laravel 5.5+)

    service provider:

    Unisharp\Setting\SettingServiceProvider::class,

    class aliases:

    'Setting' => Unisharp\Setting\SettingFacade::class,
  3. Create settings table

    php artisan vendor:publish --tag=settings
    php artisan migrate

Usage

Setting::get('name', 'Computer');
// get setting value with key 'name'
// return 'Computer' if the key does not exists

Setting::all();
// get all settings

Setting::lang('zh-TW')->get('name', 'Computer');
// get setting value with key and language

Setting::set('name', 'Computer');
// set setting value by key

Setting::lang('zh-TW')->set('name', 'Computer');
// set setting value by key and language

Setting::has('name');
// check the key exists, return boolean

Setting::lang('zh-TW')->has('name');
// check the key exists by language, return boolean

Setting::forget('name');
// delete the setting by key

Setting::lang('zh-TW')->forget('name');
// delete the setting by key and language

Dealing with array

Setting::get('item');
// return null;

Setting::set('item', ['USB' => '8G', 'RAM' => '4G']);
Setting::get('item');
// return array(
//     'USB' => '8G',
//     'RAM' => '4G',
// );

Setting::get('item.USB');
// return '8G';

Dealing with locale

By default language parameter are being resets every set or get calls. You could disable that and set your own long term language parameter forever using any route service provider or other method.

Setting::lang(App::getLocale())->langResetting(false);

More Repositories

1

laravel-filemanager

Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.
PHP
2,053
star
2

laravel-filemanager-example-5.3

Demo integration for laravel-filemanager (https://github.com/UniSharp/laravel-filemanager).
PHP
135
star
3

laravel-fileapi

Laravel File API with image thumbnail support
PHP
51
star
4

doc-us

A MySQL Schema Documentation Generator for Laravel.
PHP
37
star
5

laravel-jwt

Auth guard and middleware for jwt refesh in a concurrency use case, e.g. single page web applications.
PHP
36
star
6

helpers.js

JavaScript helpers inspired by Laravel and Ruby on Rails
TypeScript
26
star
7

gulp-pug-inheritance

Only build affected files when modify a Pug file.
JavaScript
15
star
8

s3-presigned

An AWS S3 package for pre-signed upload purpose in Laravel and PHP.
PHP
14
star
9

pug-inheritance

Get files which include or extend the given Pug file.
JavaScript
12
star
10

laravel-filemanager-plus

this is for a specific customer, and it has stoped development. Please use https://github.com/UniSharp/laravel-filemanager instead.
PHP
9
star
11

laravel-filemanager-demo-events

PHP
7
star
12

laravel-loggable

This package formats exceptions before they are written to laravel.log.
PHP
4
star
13

pricing

A modularized pricing package for buyable.
PHP
4
star
14

laravel-pagerender

PHP
4
star
15

laravel-audit-trail

PHP
4
star
16

buyable

PHP
3
star
17

laravel-hittable

PHP
3
star
18

laravel-unifly

Laravel code generator
PHP
3
star
19

vue-starter

Nuxt.js starter project template.
CSS
3
star
20

laravel-taggable

PHP
3
star
21

unisharp-payment

PHP
3
star
22

laravel-cassandra

Cassandra Query Builder
PHP
3
star
23

laravel-uploadable

PHP
3
star
24

categorizable

PHP
3
star
25

sms

PHP
2
star
26

one-or-fail

Works like laravel `firstOrFail`, but oneOrFail throws exception when getting multiple results.
PHP
2
star
27

unimd-deprecated

A Laravel/Swoole-backed online Markdown Editor (work in progress)
PHP
2
star
28

php-stubs

PHP
2
star
29

ratable

Provide a trait to multiple models to rate easliy
PHP
2
star
30

laravel-audit-trail2

Keep a change history for your models using laravel version 5.5.*
PHP
1
star
31

unimd

An online Markdown Editor (work in progress)
Vue
1
star
32

jessica-bot

A slack bot with tuling123 support.
JavaScript
1
star
33

n

A nodejs stdin handler for pipeline command.
JavaScript
1
star
34

untrust

Un-Trust is an "Un"iSharp implementation of the entrust package
PHP
1
star
35

laravel-oauth2-server

This package is for laravel 5.x, which may help you build an oauth2 server instantly.
PHP
1
star
36

uni-cms

PHP
1
star
37

logo

UniSharp Logo in pure CSS
JavaScript
1
star
38

unisharp.com

Vue
1
star
39

unisharp-vue-component

Vue
1
star
40

debugger

PHP
1
star
41

docker-base-php

Shell
1
star
42

hackmd-api

PHP
1
star
43

cart

Shopping Cart for unisharp buyable
PHP
1
star
44

laravel-google-cloud-sdk

PHP
1
star
45

holiday

Taiwan Holiday API (查詢某一個日期是否是假日)
PHP
1
star
46

laravel-widgetify

PHP
1
star
47

laravel-utilities

PHP
1
star
48

test-stabilizer

Make your tests more stable.
PHP
1
star
49

laravel-datacarrier

session-wide static data storage.
PHP
1
star
50

docker-base-php7

PHP7, nvm, yarn, mysql-client and mongo-client
Dockerfile
1
star
51

laravel-scout-disk-driver

Under development, do not use it yet.
PHP
1
star