Skip to content

Support for arrays in View:with()#14

Closed
skovachev wants to merge 1 commit intorobclancy:masterfrom
skovachev:master
Closed

Support for arrays in View:with()#14
skovachev wants to merge 1 commit intorobclancy:masterfrom
skovachev:master

Conversation

@skovachev
Copy link
Copy Markdown
Contributor

Added support for arrays in the Robbo\Presenter\View\View's with() method

@robclancy
Copy link
Copy Markdown
Owner

Can you show me what kind of code this makes work?

@skovachev
Copy link
Copy Markdown
Contributor Author

In Laravel you can use the View::with method in two ways:

  1. By passing a key and a value like so:
View::make('profile')->with('user', new User);
  1. By passing an array of data:
View::make('profile')->with(array(
    'user' => new User
));

Your package supported only 1) and I needed 2). Both versions are supported by the default Laravel View class.

@robclancy
Copy link
Copy Markdown
Owner

This has been merged into the develop branch.

@robclancy robclancy closed this Aug 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants