Laravel for Beginners – Learn to Build Full-Stack Web Apps

Loading video...

Create route and render blade file

Getting Started With Laravel

Define a Basic Route With Basic View File

Open routes/web.php file and at the end of the file put the following code.


// routes/web.php
Route::get("/about", function() {
    return view("about");
});

Create resources/views/about.blade.php and put the following HTML there.

<h1>Hello, This course is on Laravel 11</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Odit, nulla quisquam! Expedita porro quos, omnis nulla reprehenderit sequi quas fugiat ullam itaque repudiandae, eaque sapiente totam minus. Quasi, dignissimos tempore.</p>

Now access the URL http://127.0.0.1:8000/about and you should see the following result

Untitled

Discussion

Sign in to join the discussion.

No comments yet. Be the first to start the discussion!