.


Divya


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)

welcome.blade.php

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

web.php

<?php
/* |--------------------------------------------------------------------------
| 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');
});


.