https://github.com/rokde/laravel-configuration-objectified
Objectified version of laravel configuration files
https://github.com/rokde/laravel-configuration-objectified
Last synced: over 1 year ago
JSON representation
Objectified version of laravel configuration files
- Host: GitHub
- URL: https://github.com/rokde/laravel-configuration-objectified
- Owner: rokde
- License: mit
- Created: 2023-06-13T10:43:09.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-27T12:31:29.000Z (over 1 year ago)
- Last Synced: 2025-01-27T13:42:34.720Z (over 1 year ago)
- Language: PHP
- Size: 72.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Objectified version of laravel configuration files
[](https://packagist.org/packages/rokde/laravel-configuration-objectified)
[](https://github.com/rokde/laravel-configuration-objectified/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/rokde/laravel-configuration-objectified/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[](https://packagist.org/packages/rokde/laravel-configuration-objectified)
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
## Installation
You can install the package via composer:
```bash
composer require rokde/laravel-configuration-objectified
```
## Usage
Go to your `config` folder in your laravel project and replace the `return []` statement with this (e.g. `app.php`):
```php
toArray();
```
If you want to configure something you can use typed methods. For example changing the locale in `app.php` will result in this:
```php
locale('de')
->toArray();
```
These are the following Config classes with their corresponding config file
| file | Config |
|------------------|---------------------------------------|
| app.php | `AppConfig::makeDefault()->toArray()` |
| auth.php | `AuthConfig::makeDefault()->toArray()` |
| broadcasting.php | `BroadcastingConfig::makeDefault()->toArray()` |
| cache.php | `CacheConfig::makeDefault()->toArray()` |
| cors.php | `CorsConfig::makeDefault()->toArray()` |
| database.php | `DatabaseConfig::makeDefault()->toArray()` |
| filesystem.php | `FilesystemsConfig::makeDefault()->toArray()` |
| hashing.php | `HashingConfig::makeDefault()->toArray()` |
| logging.php | `LoggingConfig::makeDefault()->toArray()` |
| mail.php | `MailConfig::makeDefault()->toArray()` |
| queue.php | `QueueConfig::makeDefault()->toArray()` |
| sanctum.php | `SanctumConfig::makeDefault()->toArray()` |
| services.php | `ServicesConfig::makeDefault()->toArray()` |
| session.php | `SessionConfig::makeDefault()->toArray()` |
| view.php | `ViewConfig::makeDefault()->toArray()` |
## Testing
```bash
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Robert Kummer](https://github.com/rokde)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.