Methods summary
public
|
#
__construct( string $view, array $data = array() )
Create a new view instance.
Create a new view instance.
$view = new View('home.index');
$view = new View('admin::home.index');
$view = new View('home.index', array('name' => 'Taylor'));
Parameters
- $view
string $view
- $data
array $data
|
public static
string|boolean
|
#
exists( string $view, boolean $return_path = false )
Determine if the given view exists.
Determine if the given view exists.
Parameters
- $view
string $view
- $return_path
boolean $return_path
Returns
string|boolean
|
protected
string
|
#
path( string $view )
Get the path to a given view on disk.
Get the path to a given view on disk.
Parameters
Returns
string
|
public static
string
|
#
file( string $bundle, string $view, string $directory )
Get the path to a view using the default folder convention.
Get the path to a view using the default folder convention.
Parameters
- $bundle
string $bundle
- $view
string $view
- $directory
string $directory
Returns
string
|
public static
Laravel\View
|
#
make( string $view, array $data = array() )
Create a new view instance.
Create a new view instance.
$view = View::make('home.index');
$view = View::make('admin::home.index');
$view = View::make('home.index', array('name' => 'Taylor'));
Parameters
- $view
string $view
- $data
array $data
Returns
|
public static
Laravel\View
|
#
of( string $name, array $data = array() )
Create a new view instance of a named view.
Create a new view instance of a named view.
$view = View::of('profile');
$view = View::of('profile', array('name' => 'Taylor'));
Parameters
- $name
string $name
- $data
array $data
Returns
|
public static
|
#
name( string $view, string $name )
Assign a name to a view.
View::name('partials.profile', 'profile');
$view = View::of('profile');
Parameters
- $view
string $view
- $name
string $name
|
public static
|
#
composer( string|array $views, Closure $composer )
Register a view composer with the Event class.
Register a view composer with the Event class.
View::composer('home.index', function($view)
{
$view['title'] = 'Home';
});
Parameters
- $views
string|array $views
- $composer
Closure
$composer
|
public static
string
|
#
render_each( string $view, array $data, string $iterator, string $empty = 'raw|' )
Get the rendered contents of a partial from a loop.
Get the rendered contents of a partial from a loop.
Parameters
- $view
string $view
- $data
array $data
- $iterator
string $iterator
- $empty
string $empty
Returns
string
|
public
string
|
#
render( )
Get the evaluated string content of the view.
Get the evaluated string content of the view.
Returns
string
|
public
string
|
#
get( )
Get the evaluated contents of the view.
Get the evaluated contents of the view.
Returns
string
|
protected
string
|
#
load( )
Get the contents of the view file from disk.
Get the contents of the view file from disk.
Returns
string
|
public
array
|
#
data( )
Get the array of view data for the view instance.
Get the array of view data for the view instance.
The shared view data will be combined with the view data.
Returns
array
|
public
Laravel\View
|
#
nest( string $key, string $view, array $data = array() )
Add a view instance to the view data.
Add a view instance to the view data.
$view = View::make('foo')->nest('footer', 'partials.footer');
$view = View::make('foo')->with('footer', View::make('partials.footer'));
Parameters
- $key
string $key
- $view
string $view
- $data
array $data
Returns
|
public
Laravel\View
|
#
with( string $key, mixed $value = null )
Add a key / value pair to the view data.
Add a key / value pair to the view data.
Bound data will be available to the view as variables.
Parameters
- $key
string $key
- $value
mixed $value
Returns
|
public
Laravel\View
|
#
shares( string $key, mixed $value )
Add a key / value pair to the shared view data.
Add a key / value pair to the shared view data.
Shared view data is accessible to every view created by the application.
Parameters
- $key
string $key
- $value
mixed $value
Returns
|
public static
|
#
share( string $key, mixed $value )
Add a key / value pair to the shared view data.
Add a key / value pair to the shared view data.
Shared view data is accessible to every view created by the application.
Parameters
- $key
string $key
- $value
mixed $value
|
public
|
#
offsetExists( mixed $offset )
Implementation of the ArrayAccess offsetExists method.
Implementation of the ArrayAccess offsetExists method.
Implementation of
|
public
|
#
offsetGet( mixed $offset )
Implementation of the ArrayAccess offsetGet method.
Implementation of the ArrayAccess offsetGet method.
Implementation of
|
public
|
#
offsetSet( mixed $offset, mixed $value )
Implementation of the ArrayAccess offsetSet method.
Implementation of the ArrayAccess offsetSet method.
Implementation of
|
public
|
#
offsetUnset( mixed $offset )
Implementation of the ArrayAccess offsetUnset method.
Implementation of the ArrayAccess offsetUnset method.
Implementation of
|
public
|
#
__get( mixed $key )
Magic Method for handling dynamic data access.
Magic Method for handling dynamic data access.
|
public
|
#
__set( mixed $key, mixed $value )
Magic Method for handling the dynamic setting of data.
Magic Method for handling the dynamic setting of data.
|
public
|
#
__isset( mixed $key )
Magic Method for checking dynamically-set data.
Magic Method for checking dynamically-set data.
|
public
string
|
#
__toString( )
Get the evaluated string content of the view.
Get the evaluated string content of the view.
Returns
string
|
public
|
#
__call( mixed $method, mixed $parameters )
Magic Method for handling dynamic functions.
Magic Method for handling dynamic functions.
This method handles calls to dynamic with helpers.
|