Laravel Installation


After you’ve downloaded and installed Xampp, we need to install Composer.
Composer is a PHP package manager that is integrated with Laravel Framework. In Windows we can install it easy going to the official page and download the installer.
Composer Download page
After install it, we can open a Windows terminal and write composer for execute the command:


  • PHP >= 5.5.9
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension


Laravel Hello World Example

Laravel Hello World
After the above step, open CMD and hit the composer –version. You should receive the  Composer version information. That’s it! The setup was successful.
After composer installation, Write following command in command line.
composer global require “laravel/installer=~1.1”
After above installation, create a directory in apache24 or xamp directory, then go to command line and set your created directory.
Then write the following command into a command line.
composer create–project anvar
where, anvar is the name of the project.
Now, create your first application.
Create a controller in /app/Http/Controllers/anvar.php  and write following code in it.


AlphansoTech Step By Step Laravel Guide

Replace code in app/Http/route.php
Route::get(‘/alphansotech’, function () {
    return view(‘alphansotech’);
I hope you will find this post very useful regarding Laravel beginner guide . Let me know any questions if you have in comment regarding Laravel. I will reply you ASAP.

Laravel Application Structure

Application Structure

app − This directory contains the core code of the application.
bootstrap − This directory contains the application bootstrapping script.
config − This directory contains configuration files of application.
database − This folder contains your database migration and seeds.
public − This is the application’s document root. It starts the Laravel application. It also contains the assets of the application like JavaScript, CSS, Images, etc.
resources − This directory contains raw assets such as the LESS & Sass files, localization and language files, and Templates that are rendered as HTML.
storage − This directory contains App storage, like file uploads etc. Framework storage (cache), and application-generated logs.
test − This directory contains various test cases.
vendor − This directory contains composer dependencies.

App Directory

  • Console − All the artisan commands are stored in this directory.
  • Events − This directory stores events that your application can raise. Events may be used to alert other parts of your application that a given action has occurred, providing a great deal of flexibility and decoupling.
  • Exceptions − This directory contains your application’s exception handler and is also a good place to stick any exceptions thrown by your application.
  • Http − This directory contains your controllers, filters, and requests.
  • Jobs − This directory contains the queueable jobs for your application.
  • Listeners − This directory contains the handler classes for your events. Handlers receive an event and perform logic in response to the event being fired. For example, a UserRegistered event might be handled by a SendWelcomeEmail listener.
  • Policies − This directory contains various policies of the application
  • Providers − This directory contains various service providers.