Support for arrays in View:with() by skovachev · Pull Request #14 · robclancy/presenter

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@skovachev

Copy link

Contributor

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

@robclancy

Copy link

Owner

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

@skovachev

Copy link

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

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@skovachev @robclancy