From 4f3dbf2ec41598d14d89d5ec2ff6df27987bb390 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 17 Apr 2012 20:15:08 -0500 Subject: [PATCH] document the view::exists method. --- laravel/documentation/changes.md | 1 + laravel/documentation/views/home.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/laravel/documentation/changes.md b/laravel/documentation/changes.md index fe568e37..a52fcff9 100644 --- a/laravel/documentation/changes.md +++ b/laravel/documentation/changes.md @@ -33,6 +33,7 @@ ## Laravel 3.2 - [Added `unless` structure to Blade template engine](/docs/views/templating#blade-unless). - [Added Blade comments](/docs/views/templating#blade-comments). - [Added simpler environment management](/docs/install#environments). +- [Added `View::exists` method. - Use [Memcached](http://php.net/manual/en/book.memcached.php) API instead of older [Memcache](http://php.net/manual/en/book.memcache.php) API. - Added support for bundles outside of the bundle directory. - Added support for DateTime database query bindings. diff --git a/laravel/documentation/views/home.md b/laravel/documentation/views/home.md index b2b6b3f3..f96d25f9 100644 --- a/laravel/documentation/views/home.md +++ b/laravel/documentation/views/home.md @@ -39,6 +39,10 @@ #### Returning the view from a controller: return View::make('home.index'); }); +#### Determining if a view exists: + + $exists = View::exists('home.index'); + Sometimes you will need a little more control over the response sent to the browser. For example, you may need to set a custom header on the response, or change the HTTP status code. Here's how: #### Returning a custom response: