2017-09-15 82 views
0

檢測供應商文件夾創建時使用新流明項目:正在創建流明作曲家不能在新創建的項目

lumen new blogb 

新目錄,但廠商文件夾沒有出現在新創建的文件夾中。

當我嘗試

php artisan serve 

我收到以下錯誤(因爲沒有供應商的文件夾)這樣:

Warning: require_once(C:\Users\user\Desktop\blogb\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\Users\user\Desktop\blogb\bootstrap\app.php on line 3

Fatal error: require_once(): Failed opening required 'C:\Users\user\Desktop\blogb\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in C:\Users\user\Desktop\blogb\bootstrap\app.php on line 3

編輯:laravel新博客命令正常工作,並且應用程序可以被運行,但當流明新博客正在執行時會發生問題。

回答

1

blog目錄做

lumen new blog 

步驟後,做以下兩件事情。

  1. cp .env.example .env創建.ENV文件
  2. composer update安裝和更新相關的更新。這將創建vender目錄。

然後,一旦你在你的Web服務器訪問您的應用程序,你會得到與此類似。

Lumen (5.5.0) (Laravel Components 5.5.*) 

注:

由於Lumen是一個微型的框架,你沒有得到像composer update一些步驟外的開箱像Laravel。你必須手動完成它們。

而且您也沒有php artisan serve命令。 Read why。使用

php -S localhost:8000 -t public 

代替或使用HomesteadValet

+0

這完全解決了我的問題。感謝您的答覆! – ldragicevic

+0

很高興能有幫助:) – Gayan

1

所需的PHP模塊也應安裝。如果這一步之前,一切都正確設置(這應該是默認的安裝流明),不僅僅是

composer install

就足夠了。