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>|null $default = null ]) : array<string|int, mixed>
Parameters
- $key : string
- $default : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>getBool()
public
static getBool(string $key[, bool|null $default = null ]) : bool
Parameters
- $key : string
- $default : bool|null = null
Return values
boolgetFloat()
public
static getFloat(string $key[, float|null $default = null ]) : float
Parameters
- $key : string
- $default : float|null = null
Return values
floatgetInt()
public
static getInt(string $key[, int|null $default = null ]) : int
Parameters
- $key : string
- $default : int|null = null
Return values
intgetNullableString()
public
static getNullableString(string $key[, string|null $default = null ]) : string|null
Parameters
- $key : string
- $default : string|null = null
Tags
Return values
string|nullgetString()
public
static getString(string $key[, string|null $default = null ]) : string
Parameters
- $key : string
- $default : string|null = null
Return values
stringvalidated()
protected
static validated(mixed $value, string $type, string $key) : mixed
Parameters
- $value : mixed
- $type : string
- $key : string