banner



How To Install Laravel On Windows 10 Xampp

How to install Laravel 5 with Xampp (Windows)

Published Feb 03, 2016 Last updated Mar 20, 2018

How to install Laravel 5 with Xampp (Windows)

Requirements

  • PHP >= 5.five.9
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension

Install Xampp

First of all, we need Xampp, so nosotros tin can download information technology from the official page:
Download Xampp
enter image description here

Composer

Subsequently y'all've downloaded and installed Xampp, nosotros need to install Composer.

Composer is a PHP package manager that is integrated with Laravel Framework. In Windows we tin can install it easy going to the official page and download the installer.

Composer Download page

Later on install it, we can open up a Windows last and write composer for execute the command:

Composer

Xampp Virtual Host

We volition configure a Virtual Host in Xampp for a Laravel project, and in this instance, nosotros want to configure the domain laravel.dev for our project.

Nosotros need to edit httpd-vhosts.conf that is located in C:\xampp\apache\conf\extra\httpd-vhosts.conf and add post-obit lines at the cease of the file:

                              # VirtualHost for LARAVEL.DEV                <VirtualHost laravel.dev:fourscore>   DocumentRoot                "C:\xampp\htdocs\laravel\public"                ServerAdmin laravel.dev   <Directory                "C:\xampp\htdocs\laravel">         Options Indexes FollowSymLinks         AllowOverride All         Require all granted   </Directory> </VirtualHost>                          

Later this, our apache is listening to laravel.dev connections, but we have to configure our hosts file that allows to redirect laravel.dev to the localhost that is located in C:\Windows\System32\drivers\etc

IMPORTANT!: To edit this file, maybe we should give admission, click properties and allow your user to modify this file.
Edit hosts file calculation our localhost for laravel.dev:

                              # localhost name resolution is handled within DNS itself.                #	127.0.0.1       localhost                #	::1             localhost                127.0.0.i	laravel.dev                          

Annotation: Read at the bottom of the folio for .dev domains

Save the file and we are gear up to install laravel.

Install Laravel Framework

Nosotros are prepared to install and configure a Laravel Framework. First of all, we have to navigate to htdocs folder to install it and run this following command:

              composer create-project laravel/laravel laravel                "v.1.*"                          

Will start the installation of the Framework:

Laravel installation

Laravel installation

When it finishes, it will create following directory schema:

Schema

Finally, outset our apache and MySql from Xampp control panel:

Xampp control panel

Success!

Navigate to laravel.dev and Laravel it's installed!

Laravel installed

**If yous're having some difficulty getting laravel.dev to piece of work, here's some information you should know: (Thank you to @pooks1958) **

Gooogle recently purchased the .dev TLD, and forces Chrome (and Firefox, apparently) to employ HSTS connections to connect to whatsoever .dev TLD. If you don't believe me, go to chrome://net-internals/#hsts and query anything ending with .dev. Look at the information displayed, and notation that information technology says
static_upgrade_mode: FORCE-HTTPS. This means that when you go to www.laravel.dev, Google volition forcefulness information technology to use HTTPS Strict Transfer Security. I'grand not 100% certain on the version, simply I believe this was implemented in Chrome 59.0 and later. Unfortunately, even if you have an SSL certificate or self-signed SSL cert on your development auto, information technology volition not load any .dev TLD while using Chrome or Firefox. It would seem that Google has officially broken development machines everywhere.

So, you can't use .dev for development anymore. But what can you do? Try changing your hosts file (on Windows: go to C:\Windows\System32\Drivers\etc\hosts). After all the lines that begin with #, type a new line reading:
127.0.0.1 laravel.site (or whatever you named your projection).
Only use a different TLD since Google selfishly bankrupt the .dev domain. As for the server adjustments, you'll take to make the changes mentioned above in your httpd.conf file, but replace ".dev" with any TLD you lot chose for your projection.

The article should be updated to reverberate this. I'm not sure if Laravel has made changes to Valet to compensate for this change nonetheless, but I would imagine that an update should be rolling out before long if it hasn't already.

Observe and read more than posts from Marc Garcia Torrent

Source: https://www.codementor.io/@magarrent/how-to-install-laravel-5-xampp-windows-du107u9ji

Posted by: meurerfiefultoothe.blogspot.com

0 Response to "How To Install Laravel On Windows 10 Xampp"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel