Skip to main content

How to install LARAVEL5 with Xampp (Windows)

Hi, 

Today I am with the installation guide of LARAVEL5 in windows.


Step 1)  Requirements


a) PHP >= 5.5.9

b) OpenSSL PHP Extension
c) PDO PHP Extension
d) Mbstring PHP Extension
e) Tokenizer PHP Extension

Step 2)  Install Xampp
First of all, we need Xampp, so we can download it from the official page: Download Xampp

Step 3)  INSTALL Composer
If you've downloaded and installed Xampp, you 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 installing it, open a Windows terminal and write composer.





Step 4) Xampp Virtual Host
   We will configure a Virtual Host in Xampp for a Laravel project, and in this example, we want            to configure the domain laravel.dev for our project.

   We need to edit httpd-vhosts.conf that is located in 

           C:\xampp\apache\conf\extra\httpd-vhosts.conf and add following lines at the end of the file:

          #VirtualHost for LARAVEL.DEV


         <VirtualHost laravel.dev:80>

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

After 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




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



Step 5) Installing LARAVEL
Run this command: composer create-project laravel/laravel laravel "5.1.*"



After  Completing  open browser and put laravel.dev what you see is-




Comments

Popular posts from this blog

Magic Function in PHP (__sleep() and __wakeup() )

There are many magic methods in PHP like  __construct(), __destruct(), __callback(), __get(), __set(), __sleep(), __wake() and many more. But we will be takingon  on  __sleep() and  __wake(). __sleep() : serialize() checks if your class has a function with the magic name __sleep(). If so, that function is executed prior to any serialization. It can clean up the object and is supposed to return an array with the names of all variables of that object that should be serialized. If the method doesn't return anything then NULL is serialized and E_NOTICE is issued. serialize() is used for the representation of the storage class for storing the value. Serializing   an object means converting it to a byte stream representation that can be stored in a file. The use of __sleep()  to commit the pending task. If a bulk data is being inserted then at that time __sleep can be used. it will not release the object unless the work is not completed....

What Make Facebook page load faster ?

Facebook has a “ Lazy Loading ” system they call “ BigPipe ” that helps the pages load fast. Facebook breaks each page down into sections they call “ Pagelets” , and using Javascript only load the most important Pagelets first then load the less important ones shortly afterward. And pipeline them through several execution stages inside web servers and browsers, as the modern microprocessor do to serve the various request in an order to increase the productivity. Big Pipe is totally implemented in PHP and javascript. By loading and rendering the main page structure first with minimal info on it, the page appears to load quicker than having to wait for a complete page to download and then render. To exploit the parallelism between web server and browser, BigPipe first breaks web pages into multiple chunks called pagelets. Just as a  pipelining microprocessor  divides an instruction’s life cycle into multiple stages (such as “instruction fetch”, “instruction decode”, ...

Code for Mail in PHP

PHP mail function and mail configuration in  XAMPP  and sending mail is done from sendmail through localhost. I hope it will help you. mail() function <? php $to = 'dubeynitish22@hotmail.com' ; $subject = 'Test' ; $message = 'Hello' ; $headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion ();   if (! mail ( $to , $subject , $message , $headers )){ echo "Error !!" ; } else { echo "Email Sent !!" ; } ?> 2. php.ini configuration (For SEND-MAIL) [ mail function ] ; For Win32 only . ; http : //php.net/smtp ; SMTP = localhost ; http : //php.net/smtp-port ; smtp_port = 25   ; For Win32 only . ; http : //php.net/sendmail-from ; sendmail_from = me@example . com   ; For Unix only . You may supply arguments as well ( default : "sendmail -t -i...