Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomasvotruba/punchcard
[Deprecated] Laravel 11 comes with simliar solution out of the box
https://github.com/tomasvotruba/punchcard
configuration laravel type-declarations
Last synced: 6 days ago
JSON representation
[Deprecated] Laravel 11 comes with simliar solution out of the box
- Host: GitHub
- URL: https://github.com/tomasvotruba/punchcard
- Owner: TomasVotruba
- License: mit
- Created: 2023-02-22T16:12:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-16T14:08:32.000Z (over 1 year ago)
- Last Synced: 2024-10-30T21:04:01.627Z (21 days ago)
- Topics: configuration, laravel, type-declarations
- Language: PHP
- Homepage: https://tomasvotruba.com/blog/introducing-punchcard-object-configs-for-laravel
- Size: 430 KB
- Stars: 139
- Watchers: 3
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Lazy and strict way to configure Laravel project
I love Laravel, but I'm terrible at working with an array. I used the wrong keys and deleted the needed items, and my project kept crashing. So I did this project to help me with that.
## Installation
```bash
composer require tomasvotruba/punchcard
```
## Usage
This package provides basic fluent config classes for the Laravel project [`/config`](https://github.com/laravel/laravel/tree/10.x/config) directory.
You can use the right away after installing this package, e.g. in your `config/cache.php`:
```php
default(env('CACHE_DRIVER', 'file'))
->stores([
'array' => [
'driver' => 'array',
'serialize' => false,
],
])
->toArray();
```The default configuration is used by default. You have to set values that are changed.
Happy coding!