Config
extends Config
in package
An extension of the Laravel Config facade with extra accessors that ensure the types of the returned values.
Tags
Table of Contents
Methods
- getArray() : array<string|int, mixed>
- getBool() : bool
- getFloat() : float
- getInt() : int
- getNullableString() : string|null
- getString() : string
- validated() : mixed
Methods
getArray()
public
static getArray(string $key[, array<string|int, mixed> $default = null ]) : array<string|int, mixed>
Parameters
- $key : string
- $default : array<string|int, mixed> = null
Return values
array<string|int, mixed>getBool()
public
static getBool(string $key[, bool $default = null ]) : bool
Parameters
- $key : string
- $default : bool = null
Return values
boolgetFloat()
public
static getFloat(string $key[, float $default = null ]) : float
Parameters
- $key : string
- $default : float = null
Return values
floatgetInt()
public
static getInt(string $key[, int $default = null ]) : int
Parameters
- $key : string
- $default : int = null
Return values
intgetNullableString()
public
static getNullableString(string $key[, string $default = null ]) : string|null
Parameters
- $key : string
- $default : string = null
Tags
Return values
string|nullgetString()
public
static getString(string $key[, string $default = null ]) : string
Parameters
- $key : string
- $default : string = null
Return values
stringvalidated()
protected
static validated(mixed $value, string $type, string $key) : mixed
Parameters
- $value : mixed
- $type : string
- $key : string