Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialdorino canciani
2,265 PointsWith method
I have installed Laravel 5 and try to use with method but in the documentation i don't find it. Is a method use also in Laravel 5?
2 Answers
Tyrell Jentink
8,415 PointsLauravel 5 is a framework, not a variation on PHP itself. Basically, it uses native PHP functions and methods to construct new ones that can make building an application easier. Any native PHP functions and methods will still be available, and will be necessary to use alongside the Lauravel 5 ones to build your application.
That said, I know of no "with" method in PHP, and I also fail to find reference to it in Lauravel's documentation. Some insight into what your trying to achieve might help give us more insight.
As a dart in the dark, are you maybe mixing it up with "while"? That will still be available to you, of course.
dorino canciani
2,265 PointsNo it was my mistake. I was talking about this return view('hello')->with($data); I wrote the with method in a wrong way. Thank you for the reply :)