what is meant by Views ?

Answers were Sorted based on User's Feedback



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

what is meant by Views ?..

Answer / Sukhbir Singh Chauhan

Views are the templates used to generate the HTML output of a web page in Laravel. They contain the static and dynamic content that gets rendered when a request is made to an application route. Views can be written using simple PHP syntax, Blade templating engine, or external template engines such as Twig.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

Explain binding a singleton?

1 Answers  


How to create route name in laravel 5?

1 Answers  


What is laravel api?

1 Answers  


What are the Versions Laravel - Understanding Release Process ?

2 Answers  


How to install installing mariadb on homestead?

1 Answers  


Tell me is laravel an open source?

1 Answers  


How to make a custom validation rule in laravel?

1 Answers  


What is illuminate in laravel?

1 Answers  


What are the server requirements for laravel 6.0?

1 Answers  


Explain me active record implementation?

1 Answers  


How can we use maintenance mode in laravel 5?

1 Answers  


What is dd() function in laravel?

1 Answers  


Categories