How to place Laravel and use the teams of artisans?

I am trying recently using laravel php framework. I use Windows 7 and XP (trying to install them on both), XAMPP 1.8.1 and PHP 5.4.7.

So confusing.

  • In many articles (including the laravel documentation itself), I come across many craft encodings.
    What is a craftsman? I cannot define it so clearly. I get articles that give no simple explanation.
    I have commands like php artisan key:generate etc.
    But I always failed, with this error on the command line: 'php' is not recognized as an internal or external command, operable program or batch file .
    I got a solution, for example, "change the directory to laravel root",
    So, I chdir -ed to C: \ xampp \ htdocs \ laravel \ public \, but nothing works.

  • Am I entitled to access my laravel site using a browser through localhost/laravel/public/ ?
    So, if I try to upload it to my public site, should I put these items in my root folder (/)?

+7
source share
2 answers

You get an error when php.exe is called because the Windows command line does not track your PHP installation. You can fix this by adding it to your PATH environment variable:

Go to "My Computer"> "Properties"> "Advanced"> "Environment Variables"> "Path", add a semicolon (;) at the end, and then specify the path to the PHP binaries folder, which in your case is C: \ XAMPP \ PHP

After restarting the command line, PHP and Artisan should work fine.

As for your second question, the β€œpublic” folder should be your DocumentRoot of your server (or virtual host). There is no need to disclose the entire structure of your web server.

+12
source
  • The artisan command needs to be parsed through a php interpreter, so you name it as php artisan...

    I think you need to use php.exe to make it work on Windows. Something like c:\path\to\php.exe artisan command

  • Read the Dayle Rees book and code happy book to understand the shared folder and how to set up a virtual host for your development

+2
source

All Articles