我centos7
php56
laravel 5
和memcached
但routes.php
嘗試use Cache
當我得到:Laravel:使用的語句與非複合名 '高速緩存' 沒有效果
ErrorException in routes.php line 3:
The use statement with non-compound name 'Cache' has no effect
router.php
<?php
use Cache;
...
我centos7
php56
laravel 5
和memcached
但routes.php
嘗試use Cache
當我得到:Laravel:使用的語句與非複合名 '高速緩存' 沒有效果
ErrorException in routes.php line 3:
The use statement with non-compound name 'Cache' has no effect
router.php
<?php
use Cache;
...
剛刪除使用Cache; from your routes.php。由於文件本身不與特定的名稱空間相關聯,因此不需要。一旦你刪除它,你將不會再看到該警告。
那是因爲你已經在全局命名空間。所以當你做一些像use Cache;
這樣的事情時,你會說「當我說Cache時,我的意思是\ Cache」。因爲在全局名稱空間中已經有是,所以該語句不起作用。這就是警告的內容。
你試過用google搜索你的錯誤嗎?有跡象表明,解決這個舊的計算器問題 –
http://stackoverflow.com/questions/23745050/laravel-composer-the-use-statement-with-non-compound-name/23747053#23747053 –