PHPackages                             huantime/laravel-app-settings - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. huantime/laravel-app-settings

ActiveLibrary[Database &amp; ORM](/categories/database)

huantime/laravel-app-settings
=============================

A package with UI to store and manage all the settings for your application

1.4.0(5y ago)011MITPHPPHP ^7.2

Since Oct 4Pushed 4y agoCompare

[ Source](https://github.com/xiaoqing2016/laravel-app-settings)[ Packagist](https://packagist.org/packages/huantime/laravel-app-settings)[ Docs](https://github.com/qcod/laravel-app-settings)[ RSS](/packages/huantime-laravel-app-settings/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (5)Versions (13)Used By (0)

Fork自qcod/laravel-app-settings 主要是将表名由settings修改为app\_settings

Laravel App Settings
--------------------

[](#laravel-app-settings)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1d234b061c7e0310f95b92ed892c27e6927e9088f5ddb04f31f6625f4a847a29/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f71636f642f6c61726176656c2d6170702d73657474696e67732e737667)](https://packagist.org/packages/qcod/laravel-app-settings)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/5067da1b62a935d12970386c6c5a94607c43d4d95196d6deb530fee596da00a8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f71636f642f6c61726176656c2d6170702d73657474696e67732f6d61737465722e737667)](https://travis-ci.org/qcod/laravel-app-settings)[![Total Downloads](https://camo.githubusercontent.com/ede4ea534b20fcbee45bfaf736802709ecff64d1e7917a0b1e21d9481e12ee26/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f71636f642f6c61726176656c2d6170702d73657474696e67732e737667)](https://packagist.org/packages/qcod/laravel-app-settings)

Use `qcod/laravel-app-settings` to add settings manager with UI in your Laravel app. It stores settings in the database and by default uses Bootstrap 4 for styling but you can configure it to work with any css system.

> All the settings saved in db are cached to improve performance by reducing sql query to zero.

### Installation

[](#installation)

**1** - You can install the package via composer:

```
$ composer require huantime/laravel-app-settings
```

**2** - If you are installing on Laravel 5.4 or lower you will be needed to manually register Service Provider by adding it in `config/app.php` providers array and Facade in aliases arrays.

```
'providers' => [
    //...
    QCod\AppSettings\AppSettingsServiceProvider::class,
]

'aliases' => [
    //...
    "AppSettings" => QCod\AppSettings\Facade::class
]
```

In Laravel 5.5 or above the service provider automatically get registered and a facade `AppSettings::get('app_name')` will be available.

**3** - Now you should publish the config file with:

```
php artisan vendor:publish --provider="QCod\AppSettings\AppSettingsServiceProvider" --tag="config"
```

It will create [`config/app_settings.php`](#config-file) with all the configuration option and way to define your setting inputs divided into sections.

**4** - Now run the migration by `php artisan migrate` to create the settings table.

### Getting Started

[](#getting-started)

First you need to define all the settings you want in our settings page. For example we will need these settings `app_name`, `from_email` &amp; `from_name`. Lets define it in config:

**config/app\_settings.php**

```
