class View implements ArrayAccess, View (View source)
Macroable |
static protected array | $macros | The registered string macros. | from Macroable |
protected Factory | $factory | The view factory instance. | |
protected Engine | $engine | The engine implementation. | |
protected string | $view | The name of the view. | |
protected array | $data | The array of view data. | |
protected string | $path | The path to the view file. |
static void | macro(string $name, object|callable $macro) Register a custom macro. | from Macroable |
static void | mixin(object $mixin, bool $replace = true) Mix another object into the class. | from Macroable |
static bool | hasMacro(string $name) Checks if macro is registered. | from Macroable |
static mixed | __callStatic(string $method, array $parameters) Dynamically handle calls to the class. | from Macroable |
View | __call(string $method, array $parameters) Dynamically bind parameters to the view. | |
void | __construct(Factory $factory, Engine $engine, string $view, string $path, mixed $data = []) Create a new view instance. | |
string | render(callable $callback = null) Get the string contents of the view. | |
string | renderContents() Get the contents of the view instance. | |
string | getContents() Get the evaluated contents of the view. | |
array | gatherData() Get the data bound to the view instance. | |
array | renderSections() Get the sections of the rendered view. | |
$this | with(string|array $key, mixed $value = null) Add a piece of data to the view. | |
$this | nest(string $key, string $view, array $data = []) Add a view instance to the view data. | |
$this | withErrors(MessageProvider|array $provider) Add validation errors to the view. | |
MessageBag | formatErrors(MessageProvider|array $provider) Format the given message provider into a MessageBag. | |
string | name() Get the name of the view. | |
string | getName() Get the name of the view. | |
array | getData() Get the array of view data. | |
string | getPath() Get the path to the view file. | |
void | setPath(string $path) Set the path to the view. | |
Factory | getFactory() Get the view factory instance. | |
Engine | getEngine() Get the view's rendering engine. | |
bool | offsetExists(string $key) Determine if a piece of data is bound. | |
mixed | offsetGet(string $key) Get a piece of bound data to the view. | |
void | offsetSet(string $key, mixed $value) Set a piece of data on the view. | |
void | offsetUnset(string $key) Unset a piece of data from the view. | |
mixed | __get(string $key) Get a piece of data from the view. | |
void | __set(string $key, mixed $value) Set a piece of data on the view. | |
bool | __isset(string $key) Check if a piece of data is bound to the view. | |
void | __unset(string $key) Remove a piece of bound data from the view. | |
string | __toString() Get the string contents of the view. |
Register a custom macro.
Mix another object into the class.
Checks if macro is registered.
Dynamically handle calls to the class.
Dynamically bind parameters to the view.
Create a new view instance.
Get the string contents of the view.
Get the contents of the view instance.
Get the evaluated contents of the view.
Get the data bound to the view instance.
Get the sections of the rendered view.
Add a piece of data to the view.
Add a view instance to the view data.
Add validation errors to the view.
Format the given message provider into a MessageBag.
Get the name of the view.
Get the name of the view.
Get the array of view data.
Get the path to the view file.
Set the path to the view.
Get the view factory instance.
Get the view's rendering engine.
Determine if a piece of data is bound.
Get a piece of bound data to the view.
Set a piece of data on the view.
Unset a piece of data from the view.
Get a piece of data from the view.
Set a piece of data on the view.
Check if a piece of data is bound to the view.
Remove a piece of bound data from the view.
Get the string contents of the view.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.8/Illuminate/View/View.html