php artisan clear-compiled error

时间:2016-01-11 19:46:22

标签: php laravel laravel-5

我刚刚开始在6个月内第一次开始研究项目,直到我做了composer update并且收到以下错误后,情况一直很顺利:

vagrant@default:/vagrant$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
> php artisan clear-compiled
PHP Fatal error:  Call to undefined method Illuminate\View\Compilers\BladeCompiler::directive() in /vagrant/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 213



  [Symfony\Component\Debug\Exception\FatalErrorException]                        
  Call to undefined method Illuminate\View\Compilers\BladeCompiler::directive()  



Script php artisan clear-compiled handling the post-install-cmd event returned with an error


  [RuntimeException]                                                                                                                                                       
  Error Output: PHP Fatal error:  Call to undefined method Illuminate\View\Compilers\BladeCompiler::directive() in /vagrant/vendor/laravel/framework/src/Illuminate/Suppo  
  rt/Facades/Facade.php on line 213                                                                                                                                        


install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...

然后我尝试运行php artisan clear-compiled并得到了这个:

vagrant@default:/vagrant$ php artisan clear-compiled
PHP Fatal error:  Call to undefined method Illuminate\View\Compilers\BladeCompiler::directive() in /vagrant/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 213



  [Symfony\Component\Debug\Exception\FatalErrorException]                        
  Call to undefined method Illuminate\View\Compilers\BladeCompiler::directive()  

我正在运行以下内容:

vagrant@default:/vagrant$ php --version
PHP 5.6.17-1+deb.sury.org~trusty+2 (cli) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

我已经阅读了很多关于此问题的问题,这些问题似乎都是通过删除compiled.phpcompile.php中的storagevendor或其他内容来解决的但是,我的系统中没有这些文件。

我该怎么办?

1 个答案:

答案 0 :(得分:1)

这可能是使用不支持您的laravel版本的软件包的问题。请参阅以下示例:github.com/kodeine/laravel-acl/issues/66 https://laracasts.com/discuss/channels/laravel/php-artisan-call-to-undefind-method

相关问题