Hello world example - Laravel framework

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

We use two file for hello world example.

  1. welcome.blade.php (resources/views/welcome.blade.php)
  2. web.php (routes/web.php)


<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<title>Hello World</title>
<h1> Hello World</h1>


/* |--------------------------------------------------------------------------
| Web Routes
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
Route::get('/', function () {
return view('welcome');