No input file specified in Laravel Homestead

I am new to laravel. I am still confusing Homestead.yaml config

my laravel project is in C: / wamp / www / laravel and in Homestead.yaml I configured it like below

folders:
- map: /wamp/www/laravel
  to: /home/Vagrant/Code

sites:
- map: homestead.app
  to: /home/Vagrant/Code/Laravel/public

databases:
- homestead

variables:
- key: APP_ENV
  value: local

      

What's wrong with this configuration? Also I need to manually create

/home/Vagrant/Code 

      

and

/home/Vagrant/Code/Laravel/public?

      

If so, in which Windows directory? I am confused about the / home directories since I am using a windows 8 machine.

+3


source to share


1 answer


And yes, the configuration of the estate also puzzled me a lot. I can recommend you buy the Easy Laravel 5 book from Jason Gilmore, or read the manor chapter for free online here . It was his chapter on the configuration of the estate that helped me figure out how to do it. The eBook also contains many other useful Laravel 5 development materials and is updated frequently.

Update: The Laravel 5 Beauty blog also has a very simple tutorial on how to set up a manor for Laravel 5.1. both on Windows, Linux and Mac.

However, I will try to answer your question right here. Step 5 - how to set up your homestead configuration. And no, you don't need to create the vagrant / code folder yourself. This is an alias for the path you provide.

0. Install Composer if you haven't already.

Also add the composer cart to your path:

enter image description here

LINK TO LARGE VERSION OF IMAGE BELOW

enter image description here


1. Make sure you have downloaded the latest version of Vagrant and Oracle VirtualBox


2. Add laravel window:$ vagrant box add laravel/homestead


3. Install the Homestead CLI Tools:$ composer global require "laravel/homestead=~2.0"


4. Create your .homestead folder:

$ cd

→ Go to user folder

$ homestead init

→ Creates a .homestead folder

Also note that you need a .ssh folder including the id_rsa and id_rsa.pub files. If you are not using it in your user folder, follow this guide to get it .




5. Edit the Homestead.yaml file. I'll use my setup as an example here:

LINK TO LARGE VERSION OF IMAGE BELOW

enter image description here


6. Go to C:\Windows\System32\drivers\etc\

and edit the hosts file. It will warn you and require administrator rights. Just open it with an administrator.

Edit the hosts file with the URLs you set in the homestead.yaml file:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

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

192.168.10.10   phpmyadmin.local
192.168.10.10   lara.local
192.168.10.10   todoparrot.local

      


7. Run the following console commands to secure the firewall. To be honest, I'm not too sure what this does, but these are different kinds of restarting vagrants, so as of today with your homestead.yaml and hosts configurations.

$ vagrant global-status

→ Pay attention to the small number that appears at the beginning. Mine - 2a6e97d

$ vagrant provision 2a6e97d


8. Run $ homestead up

, let it finish and navigate to your url, in my case lara.local. Here is my screen:

enter image description here


I hope it wasn't too weird. Setting up a homestead is a real pain the first time, but when you "get" how it works, it becomes pure bliss to develop with.

If anything is unclear, please post a comment and I'll try to help :)

+10


source







All Articles