11
我剛剛添加修補程序到我的Laravel項目5.4。 當我嘗試運行:PHP Artisan修補匠不適用於Laravel 5.4和PHP 7.0.1
php artisan tinker
我收到以下錯誤:
PHP Warning: Uncaught ErrorException: require(/home/abdullah/php_apps/website): failed to open stream: Success in /home/abdullah/php_apps/website/vendor/laravel/tinker/src/ClassAliasAutoloader.php:51
Stack trace:
#0 /home/abdullah/php_apps/website/vendor/laravel/tinker/src/ClassAliasAutoloader.php(51): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'require(/home/a...', '/home/abdullah/...', 51, Array)
#1 /home/abdullah/php_apps/website/vendor/laravel/tinker/src/ClassAliasAutoloader.php(51): require()
#2 /home/abdullah/php_apps/website/vendor/laravel/tinker/src/ClassAliasAutoloader.php(33): Laravel\Tinker\ClassAliasAutoloader->__construct(Object(Psy\Shell), '/home/abdullah/...')
#3 /home/abdullah/php_apps/website/vendor/laravel/tinker/src/Console/TinkerCommand.php(59): Laravel\Tinker\ClassAliasAutoloader::register(Object(Psy\Shell), '/home/abdullah/...')
#4 [internal function]: Laravel\Tinker\Console\TinkerCommand->handle()
#5 /home/abdullah/php_apps/website/vendor/laravel/framework/src/Illuminate/Contai in /home/abdullah/php_apps/website/vendor/laravel/tinker/src/ClassAliasAutoloader.php on line 51
PHP Fatal error: Laravel\Tinker\ClassAliasAutoloader::__construct(): Failed opening required '/home/abdullah/php_apps/website' (include_path='.:/home/abdullah/.phpbrew/php/php-7.0.1/lib/php') in /home/abdullah/php_apps/website/vendor/laravel/tinker/src/ClassAliasAutoloader.php on line 51
[Symfony\Component\Debug\Exception\FatalErrorException]
Laravel\Tinker\ClassAliasAutoloader::__construct(): Failed opening required '/home/abdullah/php_apps/website' (include_path='.:/home/abdullah/.phpbrew/php/php-7.0.1/lib/php')
我曾嘗試不同的文件夾賦予的權利。 也嘗試添加Tinker類到控制檯/ kernel.php。
在您的config/app.php文件中是否存在'Laravel \ Tinker \ TinkerServiceProvider :: class,'?另外,嘗試運行'composer dump-autoload'並再次嘗試 –
@ChrisForrence是的,它已經存在了,我已經多次嘗試了composer dump-autoload – AMBasra
也許有一個未解決的'Success' class/facade作爲此錯誤'無法打開流:成功「;實際的應用程序運行沒有任何錯誤?這是否在添加之後突然發生,或者是全新的安裝? –