what is meant by Views ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can laravel be hacked?

441


Explain me active record implementation. How to use it laravel?

393


What is php artisan in laravel?

426


State the difference between authentication and authorization.

401


What are the advantages of queue?

426






What is blade php in laravel?

475


How will you create a helper file in laravel?

411


List available types of relationships in laravel eloquent.

410


How do I setup localization for an application?

422


How to use aggregate functions in laravel query?

415


Tell me in which language it was written?

406


What do you mean by laravel dusk?

399


What is laravel eloquent?

420


What is laravel dusk?

490


What is a Laravel - Contracts ?

860