我把Laravel5.1升级到5.2,一切看起来都很好。但是当尝试访问应用程序环境时,却没有得到预期的效果。
When i dd($_ENV) this is what i get
"APP_ENV" => "vagrant"
"APP_DEBUG" => "true"
"DB_HOST" => "localhost"
But When dd(\App::environment());
"production"
P.S. even I checked in
当尝试在tinker上创建一个用户时,我会看到这个错误。
我以前从来没有用过修补工,所以我不知道该怎么办。
$ artisan tinker
Psy Shell v0.6.1 (PHP 5.5.29 — cli) by Justin Hileman
>>> $user = new User;
PHP Fatal error: Class 'User' not found in eval()'d code on line 1
以前任何一个人都有过这种经历。
更新:注意:我正在使用artisan作为php artisan的别名
我最近刚换了我的macbook。我设置了我正在做的上一个项目。不幸的是,我遇到了这个错误。
could not find driver (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
708▕ // If an exception occurs when attempting to run a query, we'll format