Laravel Hello world example

In this example we will be discuss about Hello world in laravel framework.

For hello world example we need to do minimum two things.

Step 1 : go to web.php and create route.

Example :

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

Step 2 : Create welcome.blade.php file and put the code.

<!DOCTYPE html>
<html lang="">
    <title>Hello World!</title>
    <h1> Hello World!</h1>

Step 3 : Let us execute this example by the following URL in the browser. This URL may be different based on your website.