|
3 | 3 | [](https://packagist.org/packages/rawilk/laravel-settings)
|
4 | 4 | 
|
5 | 5 | [](https://packagist.org/packages/rawilk/laravel-settings)
|
| 6 | +[](https://packagist.org/packages/rawilk/laravel-settings) |
| 7 | +[](https://github.com/rawilk/laravel-settings/blob/main/LICENSE.md) |
6 | 8 |
|
7 | 9 | 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.
|
8 | 10 |
|
@@ -35,99 +37,16 @@ composer require rawilk/laravel-settings
|
35 | 37 | You can publish and run the migrations with:
|
36 | 38 |
|
37 | 39 | ```bash
|
38 |
| -php artisan vendor:publish --provider="Rawilk\Settings\SettingsServiceProvider" --tag="migrations" |
| 40 | +php artisan vendor:publish --tag="settings-migrations" |
39 | 41 | php artisan migrate
|
40 | 42 | ```
|
41 | 43 |
|
42 | 44 | You can publish the config file with:
|
43 | 45 | ```bash
|
44 |
| -php artisan vendor:publish --provider="Rawilk\Settings\SettingsServiceProvider" --tag="config" |
| 46 | +php artisan vendor:publish --tag="settings-config" |
45 | 47 | ```
|
46 | 48 |
|
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 |
131 | 50 |
|
132 | 51 | ## Testing
|
133 | 52 |
|
|
0 commit comments