PHP code example of ronappleton / laravel-typed-config

1. Go to this page and download the library: Download ronappleton/laravel-typed-config library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ronappleton / laravel-typed-config example snippets


TypedConfig::string(string $key, string $default = null): string

TypedConfig::int(string $key, int $default = null): int

TypedConfig::bool(string $key, bool $default = null): bool

TypedConfig::array(string $key, array $default = null): array

TypedConfig::float(string $key, float $default = null): float

TypedConfig::object(string $key, object $default = null): object

TypedConfig::classString(string $key, string $default = null): string

config()->string('key', 'default')

config()->int('key', 1)