I'm trying laravel php framework recently. I'm using Windows 7 and XP (tries to install it on both), XAMPP 1.8.1 and PHP 5.4.7.
So confusing.
In many articles (including laravel's documentation itself), I meet up many artisan codings.
What is artisan? I can't define it myself so clear. I end up with articles that not giving any simple explanation.
I got commands tutorials like php artisan key:generate
and else.
But I always failed, with this error on Command Prompt : 'php' is not recognized as an internal or external command, operable program or batch file
.
I got solution like "change directory to laravel root",
So, I chdir
-ed to C:\xampp\htdocs\laravel\public\ but nothing works.
I that right to access my laravel site with browser via localhost/laravel/public/
?
So, if I try to upload it to my public site, I should place those items in my root folder (/)?
Artisan is the name of the command-line interface included with Laravel. It provides a number of helpful commands for your use while developing your application. It is driven by the powerful Symfony Console component.
You are getting the error when calling php.exe because windows command prompt is not tracking your PHP installation. You can fix that by adding it into PATH environment variable:
Go to "My Computer" > "Properties" > "Advanced" > "Environment Variables" > "Path", add a semicolon (;) at the end and then path to your PHP binaries folder, which in your case is C:\xampp\php
After you restart the command prompt PHP and Artisan should work fine.
As to your second question, "public" folder should be your server's (or virtual host's) DocumentRoot. There is no need to expose the whole framework on your web server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With