laravel Views

There is a directory named resource/views inside the larval application. In this directory we store our blade files and to see the layout of this file, we can see this file by calling on the route. Can see.

The view in the laravel is used to show the layout of the webpage. The html and php file that is placed is placed inside this folder and laravel to show the same html and php file on the server. In the view, we use the function named name.

Now I will tell you how views work in laravel you can see step by step.

Step1: – Copy the following code and add it to the view/test.php file.

<html>
<body>
<h1>This is the First Laravel Page.</h1>
</body>
</html>

Step2: – Now you add this code to route/web.php.

Route::get('/test', function(){
return view('test');
});