SyntaxFix
Write A Post
Hire A Developer
Questions
Came across a similar problem, but if you do not necessarily want to return a view with view file, you can do this:
return $view->with(compact('myVar1', 'myVar2', ..... , 'myLastVar'));