Laravel, passing variables the quick way
instead of using
View::make('yourview')->with(array("variable1" => $variable1, "variable2" => $variable2));
you can use
View::make('yourview')->with(compact('variable1','variable2'));
... faster coding ...
Written by Dieter Coopman
Related protips
1 Response
Or
~~~
View::make('yourview',compact('variable1','variable2'));
~~~
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Laravel
Authors
Related Tags
#laravel
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#