I have centos7
php56
laravel 5
and memcached
but when try use Cache
in routes.php
I get:
ErrorException in routes.php line 3:
The use statement with non-compound name 'Cache' has no effect
router.php
<?php
use Cache;
...
Just remove use Cache; from your routes.php. It is not needed there as file itself is not associated with specific namespace. Once you remove it you will not see that warning again.
That is because you are already in the global namespace. So when you do something like use Cache;
, you are saying "when I say Cache, I mean \Cache". Because you already are in the global namespace, that statement has no effect. That's what the warning is about.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With