Skip to content

Commit 36a5466

Browse files
committed
Update docs
1 parent 738e262 commit 36a5466

File tree

2 files changed

+8
-172
lines changed

2 files changed

+8
-172
lines changed

README.md

+5-86
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
[![Latest Version on Packagist](https://img.shields.io/packagist/v/rawilk/laravel-settings.svg?style=flat-square)](https://packagist.org/packages/rawilk/laravel-settings)
44
![Tests](https://github.com/rawilk/laravel-settings/workflows/Tests/badge.svg?style=flat-square)
55
[![Total Downloads](https://img.shields.io/packagist/dt/rawilk/laravel-settings.svg?style=flat-square)](https://packagist.org/packages/rawilk/laravel-settings)
6+
[![PHP from Packagist](https://img.shields.io/packagist/php-v/rawilk/laravel-settings?style=flat-square)](https://packagist.org/packages/rawilk/laravel-settings)
7+
[![License](https://img.shields.io/github/license/rawilk/laravel-settings?style=flat-square)](https://github.com/rawilk/laravel-settings/blob/main/LICENSE.md)
68

79
Laravel Settings allows you to store your application settings in the database. It works alongside of the built-in configuration system that Laravel offers. With this package, you can store application specific settings that wouldn't make sense to store in a configuration file, or that you want end-users to be able to update through your application's UI.
810

@@ -35,99 +37,16 @@ composer require rawilk/laravel-settings
3537
You can publish and run the migrations with:
3638

3739
```bash
38-
php artisan vendor:publish --provider="Rawilk\Settings\SettingsServiceProvider" --tag="migrations"
40+
php artisan vendor:publish --tag="settings-migrations"
3941
php artisan migrate
4042
```
4143

4244
You can publish the config file with:
4345
```bash
44-
php artisan vendor:publish --provider="Rawilk\Settings\SettingsServiceProvider" --tag="config"
46+
php artisan vendor:publish --tag="settings-config"
4547
```
4648

47-
This is the contents of the published config file:
48-
49-
```php
50-
return [
51-
/*
52-
|--------------------------------------------------------------------------
53-
| Settings Table
54-
|--------------------------------------------------------------------------
55-
|
56-
| Database table used to store settings in.
57-
|
58-
*/
59-
'table' => 'settings',
60-
61-
/*
62-
|--------------------------------------------------------------------------
63-
| Caching
64-
|--------------------------------------------------------------------------
65-
|
66-
| If enabled, all settings are cached after accessing them.
67-
|
68-
*/
69-
'cache' => true,
70-
71-
/*
72-
|--------------------------------------------------------------------------
73-
| Cache Key Prefix
74-
|--------------------------------------------------------------------------
75-
|
76-
| Specify a prefix to prepend to any setting key being cached.
77-
|
78-
*/
79-
'cache_key_prefix' => 'settings.',
80-
81-
/*
82-
|--------------------------------------------------------------------------
83-
| Encryption
84-
|--------------------------------------------------------------------------
85-
|
86-
| If enabled, all values are encrypted and decrypted.
87-
|
88-
*/
89-
'encryption' => true,
90-
91-
/*
92-
|--------------------------------------------------------------------------
93-
| Driver
94-
|--------------------------------------------------------------------------
95-
|
96-
| The driver to use to store and retrieve settings from. You are free
97-
| to add more drivers in the `drivers` configuration below.
98-
|
99-
*/
100-
'driver' => env('SETTINGS_DRIVER', 'eloquent'),
101-
102-
/*
103-
|--------------------------------------------------------------------------
104-
| Drivers
105-
|--------------------------------------------------------------------------
106-
|
107-
| Here you may configure the driver information for each repository that
108-
| is used by your application. A default configuration has been added
109-
| for each back-end shipped with this package. You are free to add more.
110-
|
111-
| Each driver you add must implement the \Rawilk\Settings\Contracts\Driver interface.
112-
|
113-
*/
114-
'drivers' => [
115-
'database' => [
116-
'driver' => 'database',
117-
'connection' => env('DB_CONNECTION', 'mysql'),
118-
],
119-
'eloquent' => [
120-
'driver' => 'eloquent',
121-
122-
/*
123-
* You can use any model you like for the setting, but it needs to implement
124-
* the \Rawilk\Settings\Contracts\Setting interface.
125-
*/
126-
'model' => \Rawilk\Settings\Models\Setting::class,
127-
],
128-
],
129-
];
130-
```
49+
You can view the default configuration here: https://github.com/rawilk/laravel-settings/blob/main/config/breadcrumbs.php
13150

13251
## Testing
13352

docs/installation.md

+3-86
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ composer require rawilk/laravel-settings
1616
When using the `database` or `eloquent` drivers, you should publish the migration files. You can publish and run the migrations with:
1717

1818
```bash
19-
php artisan vendor:publish --provider="Rawilk\Settings\SettingsServiceProvider" --tag="migrations"
19+
php artisan vendor:publish --tag="settings-migrations"
2020
php artisan migrate
2121
```
2222

@@ -25,90 +25,7 @@ php artisan migrate
2525
You can publish the configuration file with:
2626

2727
```bash
28-
php artisan vendor:publish --provider="Rawilk\Settings\SettingsServiceProvider" --tag="config"
28+
php artisan vendor:publish --tag="settings-config"
2929
```
3030

31-
The default content of `config/settings.php`:
32-
33-
```php
34-
return [
35-
/*
36-
|--------------------------------------------------------------------------
37-
| Settings Table
38-
|--------------------------------------------------------------------------
39-
|
40-
| Database table used to store settings in.
41-
|
42-
*/
43-
'table' => 'settings',
44-
45-
/*
46-
|--------------------------------------------------------------------------
47-
| Caching
48-
|--------------------------------------------------------------------------
49-
|
50-
| If enabled, all settings are cached after accessing them.
51-
|
52-
*/
53-
'cache' => true,
54-
55-
/*
56-
|--------------------------------------------------------------------------
57-
| Cache Key Prefix
58-
|--------------------------------------------------------------------------
59-
|
60-
| Specify a prefix to prepend to any setting key being cached.
61-
|
62-
*/
63-
'cache_key_prefix' => 'settings.',
64-
65-
/*
66-
|--------------------------------------------------------------------------
67-
| Encryption
68-
|--------------------------------------------------------------------------
69-
|
70-
| If enabled, all values are encrypted and decrypted.
71-
|
72-
*/
73-
'encryption' => true,
74-
75-
/*
76-
|--------------------------------------------------------------------------
77-
| Driver
78-
|--------------------------------------------------------------------------
79-
|
80-
| The driver to use to store and retrieve settings from. You are free
81-
| to add more drivers in the `drivers` configuration below.
82-
|
83-
*/
84-
'driver' => env('SETTINGS_DRIVER', 'eloquent'),
85-
86-
/*
87-
|--------------------------------------------------------------------------
88-
| Drivers
89-
|--------------------------------------------------------------------------
90-
|
91-
| Here you may configure the driver information for each repository that
92-
| is used by your application. A default configuration has been added
93-
| for each back-end shipped with this package. You are free to add more.
94-
|
95-
| Each driver you add must implement the \Rawilk\Settings\Contracts\Driver interface.
96-
|
97-
*/
98-
'drivers' => [
99-
'database' => [
100-
'driver' => 'database',
101-
'connection' => env('DB_CONNECTION', 'mysql'),
102-
],
103-
'eloquent' => [
104-
'driver' => 'eloquent',
105-
106-
/*
107-
* You can use any model you like for the setting, but it needs to implement
108-
* the \Rawilk\Settings\Contracts\Setting interface.
109-
*/
110-
'model' => \Rawilk\Settings\Models\Setting::class,
111-
],
112-
],
113-
];
114-
```
31+
You can view the default configuration here: https://github.com/rawilk/laravel-settings/blob/{branch}/config/breadcrumbs.php

0 commit comments

Comments
 (0)