what is meant by Views ?
Answer / surbhi
In MVC framework, the letter V stands for Views.
It separates the application logic and the presentation logic.
Views are stored in resources/views directory.
Generally, the view contains the HTML which will be served by the application.
Example : Copy the following code and save it at resources/views/test.php
<html>
<body>
<h1>Hello, World</h1>
</body>
</html>
Add the following line in app/Http/routes.php file to set the route for the above view.
Route::get('/test', function(){
return view('test');
});
| Is This Answer Correct ? | 0 Yes | 0 No |
How to enable multiple php versions in homestead?
What are the benefits of laravel?
What is use of pluck in laravel?
Tell me why laravel over other php frameworks?
Explain important directories used in a common laravel application.
How does the ioc (inversion of control) container work?
How to use joins in laravel?
How to launch vagrant box?
What is a named route?
What is laravel migration?
Explain how to get requested path in laravel?
Explain how to create custom middleware in laravel?