Laravel Classroom image

Prashant  Nigam / Student / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9|Last
Lessons:-Using Controllers

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 :

 

 
 
 

Prashant  Nigam

Skills    Laravel

Qualifications :-
Location :-,,,
Description:-
Explore
 

  Students (0)