You’re free to change this to any location you please. The default value is ~/Code, meaning Homestead expects your project to reside in a directory named Code found in your home directory. The folders object’s map attribute identifies the location in which your Laravel project will be located. Note: It’s this particular step that tends to confuse most Homestead beginners, so pay close attention to the following description. If you change the sites property after provisioning the Homestead box, you should re-run vagrant reload -provision to update the Nginx configuration on the virtual machine. Homestead can serve as a convenient, virtualized environment for every Laravel project you are working on: Again, you may add as many sites to your Homestead environment as necessary. You should set it to the “public” folder of your laravel app. Any php code inside that folder will get executed when you will go to homestead.app inside your browser. By default configuration, you will have a “homestead.app” pseudo-domain which will point to a folder inside the “shared folder”. Sites is a configuration array for Nginx. You may configure as many shared folders as necessary: As files within these folders are changed, they will be kept in sync between your local machine and the Homestead environment. Laravel Homestead configures a default folder in the home directory of the Host OS.The folders property of the Homestead.yaml file lists all of the folders you wish to share with your Homestead environment. ![]() ![]() I recommend virtualbox.Ĭonfiguring Shared Folders/ Folder Mappingįolder mapping means that your Guest OS and Host OS will share a common folder where you can keep your laravel files. ![]() You may set this to the provider you prefer. The provider key in your Homestead.yaml file indicates which Vagrant provider should be used: virtualbox, vmware_fusion, vmware_workstation, or parallels. The homstead.yaml is already configured for a default app. STEP 4: CONFIGURING THE LARAVEL HOMESTEAD The Homestead.yaml file will be placed in the Homestead directory: Once you have cloned the Homestead repository, run the bash init.sh command from the Homestead directory to create the Homestead.yaml configuration file. Consider cloning the repository into a Homestead folder within your "home" directory, as the Homestead box will serve as the host to all of your Laravel projects: You may install Homestead by simply cloning the repository. It will take a few minutes to download the box, depending on your Internet connection speed: Once VirtualBox / VMware and Vagrant have been installed, you should add the laravel/homestead box to your Vagrant installation using the following command in your terminal. I used VirtualBox and as it is free, I am pretty sure most of you guys will be using it too. Before launching your Homestead environment, you must install VirtualBox, ( VMWare, or Parallels) as well as Vagrant. The first step is getting the required software for Homestead. Homestead runs on any Windows, Mac, or Linux system, and includes the Nginx web server, PHP 7.1, MySQL, PostgreSQL, Redis, Memcached, Node, and all of the other goodies you need to develop amazing Laravel applications. If something goes wrong, you can destroy and re-create the box in minutes! No more worrying about messing up your operating system! Vagrant boxes are completely disposable. ![]() Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine.
0 Comments
Leave a Reply. |