Stefany93 Posted July 5, 2015 Share Posted July 5, 2015 Hello, I installed composer and then I tried installing the laravel command line functions as it was described in their website, namely I ran this command: composer global require "laravel/installer=~1.1" Taken from directly from the official website - http://laravel.com/docs/4.2#install-laravel But when I run: laravel new blog I get an error: C:\xampp\htdocs>laravel new blog 'laravel' is not recognized as an internal or external command, operable program or batch file. Please help! I really want to use the "laravel" command lines from the CMD. I am on Windows 8.1. I searched a lot in Google for help but with no luck Many thanks! Quote Link to comment https://forums.phpfreaks.com/topic/297183-laravel-cant-get-the-laravel-command-to-run-in-the-cmd/ Share on other sites More sharing options...
mikosiko Posted July 5, 2015 Share Posted July 5, 2015 And you did this? "Make sure to place the ~/.composer/vendor/bin directory in your PATH so the laravel executable is found when you run the laravel command in your terminal." 1 Quote Link to comment https://forums.phpfreaks.com/topic/297183-laravel-cant-get-the-laravel-command-to-run-in-the-cmd/#findComment-1515601 Share on other sites More sharing options...
Stefany93 Posted July 5, 2015 Author Share Posted July 5, 2015 Yes, unless I did it wrong. Here is a pic: Quote Link to comment https://forums.phpfreaks.com/topic/297183-laravel-cant-get-the-laravel-command-to-run-in-the-cmd/#findComment-1515604 Share on other sites More sharing options...
mikosiko Posted July 5, 2015 Share Posted July 5, 2015 (edited) If you go directly to that directory look for the laravel.bat or similar an try to execute it there... The error message is clear enough... Did you try restarting your computer and try? Edited July 5, 2015 by mikosiko 1 Quote Link to comment https://forums.phpfreaks.com/topic/297183-laravel-cant-get-the-laravel-command-to-run-in-the-cmd/#findComment-1515605 Share on other sites More sharing options...
Stefany93 Posted July 5, 2015 Author Share Posted July 5, 2015 Thank you very much, but laravel.bat is not in this directory I restarted the pc without luck :( Quote Link to comment https://forums.phpfreaks.com/topic/297183-laravel-cant-get-the-laravel-command-to-run-in-the-cmd/#findComment-1515615 Share on other sites More sharing options...
Stefany93 Posted July 5, 2015 Author Share Posted July 5, 2015 Fixed the problem. It turned out that the PATH was NOT included, I thought it was, but that path turned out to be the one of composer for its CMD commands, not the Laravel ones. So I ran composer global require "laravel/installer=~1.1" and then the message appeared " Changing directory to C:\Users\Stefany\AppData\Roaming\Composer\vendor\bin " So I went to that directory and I saw that laravel.bat file WAS THERE, so I copied the path and pasted in in the system variavles windows, then ran the Laravel command: laravel new blog And it worked! Many thanks for your help! Quote Link to comment https://forums.phpfreaks.com/topic/297183-laravel-cant-get-the-laravel-command-to-run-in-the-cmd/#findComment-1515622 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.