Blade
in package
Table of Contents
Properties
- $blade : mixed
Methods
- __construct() : mixed
- blade() : Blade
- Return actual blade instance
- compiler() : mixed
- Hook into the blade compiler
- config() : Blade
- Configure your view and cache directories
- configure() : Blade
- Configure your view and cache directories
- directive() : mixed
- Add a new namespace to the loader
- make() : string
- Render your blade template,
- render() : mixed
- Render your blade template,
- setupDefaultDirectives() : mixed
- Setup default directives
Properties
$blade
protected
mixed
$blade
Methods
__construct()
public
__construct([string|null $viewPaths = null ][, string|null $cachePath = null ]) : mixed
Parameters
- $viewPaths : string|null = null
- $cachePath : string|null = null
blade()
Return actual blade instance
public
blade() : Blade
Return values
Bladecompiler()
Hook into the blade compiler
public
compiler() : mixed
config()
Configure your view and cache directories
public
config(string|array<string|int, mixed> $viewPaths[, string|null $cachePath = null ]) : Blade
Parameters
- $viewPaths : string|array<string|int, mixed>
-
The path to your view or an array of paths
- $cachePath : string|null = null
-
The path to your cache directory
Return values
Bladeconfigure()
Configure your view and cache directories
public
configure(string|array<string|int, mixed> $viewPaths[, string|null $cachePath = null ]) : Blade
Parameters
- $viewPaths : string|array<string|int, mixed>
-
The path to your view or an array of paths
- $cachePath : string|null = null
-
The path to your cache directory
Return values
Bladedirective()
Add a new namespace to the loader
public
directive(string $name, callable $handler) : mixed
Parameters
- $name : string
- $handler : callable
make()
Render your blade template,
public
make(string $view[, mixed $data = [] ][, mixed $mergeData = [] ]) : string
You can optionally pass data into the view as a second parameter.
Don't forget to chain the render
method
Parameters
- $view : string
- $data : mixed = []
- $mergeData : mixed = []
Return values
stringrender()
Render your blade template,
public
render(string $view[, mixed $data = [] ][, mixed $mergeData = [] ]) : mixed
A shorter version of the original make
command.
You can optionally pass data into the view as a second parameter
Parameters
- $view : string
- $data : mixed = []
- $mergeData : mixed = []
setupDefaultDirectives()
Setup default directives
protected
setupDefaultDirectives() : mixed