Skip to content

Commit

Permalink
Method Specific View Composer
Browse files Browse the repository at this point in the history
When defining multiple view composers it is important to point out that you can be method/action specific.
  • Loading branch information
JordanDalton committed Aug 19, 2014
1 parent e75a0cb commit bd98b6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion responses.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ You may use the `composers` method to register a group of composers at the same
View::composers(array(
'AdminComposer' => array('admin.index', 'admin.profile'),
'UserComposer' => 'user',
'ProductComposer@create' => 'product'
));

> **Note:** There is no convention on where composer classes may be stored. You are free to store them anywhere as long as they can be autoloaded using the directives in your `composer.json` file.
Expand Down Expand Up @@ -231,4 +232,4 @@ The `macro` function accepts a name as its first argument, and a Closure as its

return Response::caps('foo');

You may define your macros in one of your `app/start` files. Alternatively, you may organize your macros into a separate file which is included from one of your `start` files.
You may define your macros in one of your `app/start` files. Alternatively, you may organize your macros into a separate file which is included from one of your `start` files.

0 comments on commit bd98b6f

Please sign in to comment.