Controller
in package
Leaf base controller ----------------- Base controller for Leaf PHP Framework
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- auth() : Auth
- Return the leaf auth object
- errors() : mixed
- Get auth, session and validation errors
- id() : mixed
- Get the currently authenticated user's ID.
- render() : mixed
- Render a view
- user() : mixed
- Get the currently authenticated user.
- validate() : mixed
- Validate the incoming request with the given rules.
- view() : mixed
- Return a view with the given data.
Properties
$request
public
mixed
$request
$response
public
mixed
$response
$view
public
mixed
$view
Methods
__construct()
public
__construct() : mixed
auth()
Return the leaf auth object
public
auth() : Auth
Return values
Autherrors()
Get auth, session and validation errors
public
errors() : mixed
id()
Get the currently authenticated user's ID.
public
id() : mixed
render()
Render a view
public
render(string $view[, array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $view : string
- $data : array<string|int, mixed> = []
user()
Get the currently authenticated user.
public
user() : mixed
validate()
Validate the incoming request with the given rules.
public
validate(array<string|int, mixed> $rules) : mixed
Parameters
- $rules : array<string|int, mixed>
-
The rules to validate against
view()
Return a view with the given data.
public
view(string $view[, array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $view : string
- $data : array<string|int, mixed> = []