5/10/2018 - 7:10 AM

Setting up Laravel

Laravel introduction

Routes example
  // Test
  Route::get('/hai', function () {
    return view('pages.about');

  // Pass id
  Route::get('/me/{id}/{name}', function ($id, $name) {
    return $id . $name;
Creating Controller
  php artisan make:controller PagesController
Model is in app as php file

Controller is in app/http/controllers

    namespace is identifier
View in Resourses/views

Routes in routes folder main is web

Config database

put database creditial in .env

public folder contains css and js
Create project
  composer create-project laravel/laravel taxapp
Create virtual host
    (Set Server name and root at end)
    <VirtualHost *:80>
     DocumentRoot "C:/xampp/htdocs"
     ServerName localhost

    <VirtualHost *:80>
      DocumentRoot "C:/xampp/htdocs/taxapp/public"
go to  
  C:\Windows\System32\drivers\etc\host       localhost