LaravelPackages.net
Acme Inc.
Toggle sidebar
thuraaung2493/laravel-config-types

A small wrapper types safe class for Laravel config.

18
0
v0.1.1
About thuraaung2493/laravel-config-types

thuraaung2493/laravel-config-types is a Laravel package for a small wrapper types safe class for laravel config.. It currently has 0 GitHub stars and 18 downloads on Packagist (latest version v0.1.1). Install it with composer require thuraaung2493/laravel-config-types. Discover more Laravel packages by thuraaung2493 or browse all Laravel packages to compare alternatives.

Last updated

Laravel Config Types

It supports Laravel 9+ and PHP 8.2+

Installation

composer require thuraaung2493/laravel-config-types

Usage


// Facades
use Thuraaung\ConfigTypes\Facades\Config

  Config::string('app.name') // 'Laravel'

// Via Service Container

use Thuraaung\ConfigTypes\ConfigResolver;

class Example
{
  public function __construct(
    private readonly ConfigResolver $config,
  ) {}

  public function test(): string
  {
    return $this->config->string('app.name');
  }
}

$example = new Example();
$example->test() // 'Laravel'

Test

  composer test

License

This package is open-sourced software licensed under the MIT license

Comments