tomasvotruba/punchcard

This package is abandoned and no longer maintained. The author suggests using the laravel/framework package instead.

Lazy and strict way to configure your Laravel projects

0.2.7 2023-06-16 14:08 UTC

This package is auto-updated.

Last update: 2024-03-04 06:49:25 UTC


README

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

composer require tomasvotruba/punchcard

Usage

This package provides basic fluent config classes for the Laravel project /config directory.

You can use the right away after installing this package, e.g. in your config/cache.php:

<?php

declare(strict_types=1);

use TomasVotruba\PunchCard\CacheConfig;

return CacheConfig::make()
    ->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!