Utils
in package
This is the LDCCRM utility class
Tags
Table of Contents
- $config : array<string|int, mixed>
- The env config
- $packageInfos : array<string|int, mixed>
- Package infos
- getConfig() : string|null
- Get config
- getPackageInfo() : array<string|int, mixed>
- Get composer.json infos
- getResquest() : Request
- Generate a Request from the route name
- makeValidator() : Validator
- Create a new Validator instance.
Properties
$config
The env config
private
static array<string|int, mixed>
$config
$packageInfos
Package infos
private
static array<string|int, mixed>
$packageInfos
Methods
getConfig()
Get config
public
static getConfig(string $key[, string $default = null ]) : string|null
Parameters
- $key : string
- $default : string = null
Tags
Return values
string|null —getPackageInfo()
Get composer.json infos
public
static getPackageInfo() : array<string|int, mixed>
Return values
array<string|int, mixed> —getResquest()
Generate a Request from the route name
public
static getResquest(string $routeName[, array<string|int, mixed> $query = [] ][, array<string|int, mixed> $data = [] ]) : Request
Parameters
- $routeName : string
- $query : array<string|int, mixed> = []
-
params to pass on to the route
- $data : array<string|int, mixed> = []
-
http body params
Return values
Request —makeValidator()
Create a new Validator instance.
public
static makeValidator(array<string|int, mixed> $data, array<string|int, mixed> $rules[, array<string|int, mixed> $messages = [] ][, array<string|int, mixed> $customAttributes = [] ]) : Validator
Parameters
- $data : array<string|int, mixed>
- $rules : array<string|int, mixed>
- $messages : array<string|int, mixed> = []
- $customAttributes : array<string|int, mixed> = []