I just started to learn php/laravel by following some guides and tutorials, which led me to run a server using php artisan serve command.
我采取的步骤如下:
install laravel using composer and adding it to $PATH.
creating a project by using laravel new new-blog
changing directory into the project foler and running php artisan serve command.
但是,而不是带有地址的php服务器的预期输出,我得到此错误:
PHP Warning: require(/home/sflash/Documents/php/laravel/new-blog/vendor/autoload.php): failed to open stream: No such file or directory in /home/sflash/Documents/php/laravel/new-blog/artisan on line 18
PHP Fatal error: require(): Failed opening required '/home/sflash/Documents/php/laravel/new-blog/vendor/autoload.php' (include_path='.:/usr/share/php') in /home/sflash/Documents/php/laravel/new-blog/artisan on line 18
我在linux机器上(debian破坏者)。我的项目文件夹的结构如下:
app composer.json package.json README.md server.php webpack.mix.js
artisan config phpunit.xml resources storage
bootstrap database public routes tests
As the error code above states, I don't have a file called vendor/autoload.php. How does this occur/how to fix this?