Laravel Classroom
PRADEEP JOSHI /
Professional /
Web Technology
3.3 Using Views
Echoing out source from our Controllers yields a result, but it’s not an elegant solution. If you
are interested in learning Laravel then elegant solutions may well have been what brought you
here. The nature of MVC suggests that we separate our visual layer from the application’s logic.
This is where the ‘Views’ portion of the pattern comes into play.
With Laravel, views could not not be simpler. Simply add HTML templates to your /application/
views/ directory with a lower-case file name, and a .php extension. For example :
1 /application/views/welcome.php
With the contents :
1 <h1>Holla!</h1>
2 <p>This is the welcome action of the account controller.</p>
Now we need to return the View from our welcome action. Laravel has a beautiful expressive
way of doing this, let’s take a look :
PRADEEP JOSHI
Skills Laravel
Qualifications :-Location :-Yamuna Colony,Dehradun,Uttarakhand,India
Description:-
Explore