Skip to content

Conversation

deleugpn
Copy link
Contributor

In order to implement a data interceptor between any controller with any view, I had to override the whole ViewServiceProvider::registerFactory() method.

Extracting the class instance to it's own method makes it a lot easier to override without having to worry about future changes in the default ViewServiceProvider.

/**
* Create a new Factory Instance.
*
* @param EngineResolver $resolver
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 * @param  \Illuminate\View\Engines\EngineResolver  $resolver
 * @param  \Illuminate\View\ViewFinderInterface  $finder
 * @param  \Illuminate\Contracts\Events\Dispatcher  $events
 * @return \Illuminate\View\Factory

@taylorotwell taylorotwell merged commit 878fb0c into laravel:master Jul 21, 2017
@deleugpn deleugpn deleted the override-view branch July 21, 2017 14:58
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.

3 participants