Laravel Basics

Install Composer

Install WAMP

c:\wamp64\www>composer create-project laravel/laravel helloworld

Views (C:\wamp64\www\helloworld\resources\views)

  • C:\wamp64\www\helloworld\resources\views\hi.blade.php

Routes (C:\wamp64\www\helloworld\routes)


Route::get(‘hii’, function () {
return view(‘hi’);

Create a new template file in a new subfolder views\layouts\app.blade.php

<title>App Name – @yield(‘title’)</title>
This is the master sidebar.

<div class=”container”>

Create  a new Controller as Http\Controllers\MainController.php


namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;

class MainController extends Controller
* Show the profile for the given user.
* @param int $id
* @return View
public function show()
return view(‘’);

Create the route

Route::get(‘start’, ‘MainController@show’);

Test by pointing location to http://localhost/helloworld/public/start

It will call the MainController.
MainController will load the view


Add a Comment

Your email address will not be published. Required fields are marked *