infinety-es / config-manager
Package to edit and view config files
Installs: 2 312
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 3
Forks: 6
Open Issues: 1
Requires
- infinety-es/config: ^1.2
README
With this package you can edit your Laravel config files in an easy way.
Usage Instructions
Install through composer:
composer require infinety-es/config-manager
Add this to app/config/app.php
under the providers key:
Infinety\ConfigManager\ConfigManagerServiceProvider::class,
Publish package files:
php artisan vendor:publish --provider="Infinety\ConfigManager\ConfigManagerServiceProvider"
Create default layout with php artisan make:auth
and edit layouts/app.blade.php
and add a yield called script after app.js. Your app.blade.php should look like:
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}"></script>
@yield('scripts')
</body>
Edit config/configmanager.php
config file to set the route and middleware, default to:
<?php return [ /* |-------------------------------------------------------------------------- | Routes group config |-------------------------------------------------------------------------- | | The default group settings for the translations routes. | */ 'route' => [ 'prefix' => 'dashboard/config', 'middleware' => [ 'web', 'auth', 'role:admin', ], ], ];
And now go to your route. Yo will see all config files in the select. Choose one and the page will refresh with the config keys and values.
Important notice:
Currently this package is not saving no defined arrays. Take a look this example:
<?php return [ 'route' => [ 'myData' => [ //This array can not be changed in this moment 'first', 'second', 'third', ], 'myObject' => [ //This array can be changed because has keys 'demo' => false, 'test' => true ] 'custom' => true, //This can be changed 'value' => 'my own value' //This can be changed ], ];
I will try to fix shortly. Also if you like it you can make a Pull Request,
License
Mit
Author
Contributing ![contributions welcome](https://camo.githubusercontent.com/8531ea80bc5e0ac96a01c1f2e18f168ca543ffd837522065bcf93f238774d4b8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6e747269627574696f6e732d77656c636f6d652d627269676874677265656e2e7376673f7374796c653d666c6174)
Hope you like it!