> For the complete documentation index, see [llms.txt](https://overfinch.gitbook.io/cheatsheet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overfinch.gitbook.io/cheatsheet/laravel/laravel-cheatsheet-big/view.md).

# View

```php
View::make('path/to/view');
View::make('foo/bar')->with('key', 'value');
View::make('foo/bar')->withKey('value');
View::make('foo/bar', array('key' => 'value'));
View::exists('foo/bar');
// Share a value across all views
 View::share('key', 'value');
// Nesting views
 View::make('foo/bar')->nest('name', 'foo/baz', $data);
// Register a view composer
 View::composer('viewname', function($view){});
//Register multiple views to a composer
 View::composer(array('view1', 'view2'), function($view){});
// Register a composer class
 View::composer('viewname', 'FooComposer');
View::creator('viewname', function($view){});
```
