First When I tried to generate an application key for Laravel application I got this error :
'php' is not recognized as an internal or external command,
operable program or batch file.
1- On start command line type environment and choose from results the system environment not the account environment.
2.Click on Environments Variables
3.click on Edit then add the path to php.exe on the end of the line , dont add the file name php.exe to the path, just the folder that contain the file.
4. reboot the system.
Now for Laravel to run artisan :
1. Go to the application folder in your Laravel project and open the file application.php, and find the key value :
'key' => ''.
this value must be empty nothing inside it .
2.opend the command screen by typing cmd.exe on the start run line.
3. on the command prompt change directory to Laravel Directory.
4. Type php artisan key:generate.
the system will response by this message " Configuration updated with secure key"
the Key value in application.php file will be changed by the system.
Thats All ,
For Laravel-4 the same process can be applied
No comments:
Post a Comment