loader
loader
The Laravel view loader event name.
__construct(string $view, array $data = array()) : void
Create a new view instance.
// Create a new view instance $view = new View('home.index');
// Create a new view instance of a bundle's view
$view = new View('admin::home.index');
// Create a new view instance with bound data
$view = new View('home.index', array('name' => 'Taylor'));
string | $view | |
array | $data |
make(string $view, array $data = array()) : \Laravel\View
Create a new view instance.
// Create a new view instance $view = View::make('home.index');
// Create a new view instance of a bundle's view
$view = View::make('admin::home.index');
// Create a new view instance with bound data
$view = View::make('home.index', array('name' => 'Taylor'));
string | $view | |
array | $data |
of(string $name, array $data = array()) : \Laravel\View
Create a new view instance of a named view.
// Create a new named view instance $view = View::of('profile');
// Create a new named view instance with bound data
$view = View::of('profile', array('name' => 'Taylor'));
string | $name | |
array | $data |
nest(string $key, string $view, array $data = array()) : \Laravel\View
Add a view instance to the view data.
// Add a view instance to a view's data $view = View::make('foo')->nest('footer', 'partials.footer');
// Equivalent functionality using the "with" method
$view = View::make('foo')->with('footer', View::make('partials.footer'));
string | $key | |
string | $view | |
array | $data |
with(string $key, mixed $value = null) : \Laravel\View
Add a key / value pair to the view data.
Bound data will be available to the view as variables.
string | $key | |
mixed | $value |
shares(string $key, mixed $value) : \Laravel\View
Add a key / value pair to the shared view data.
Shared view data is accessible to every view created by the application.
string | $key | |
mixed | $value |
Documentation created by phpDocumentor