A
A
Arthur2019-01-19 10:44:42
Laravel
Arthur, 2019-01-19 10:44:42

Laravel HTTP ERROR 500?

On a working project, I ran php artisan config:cache, after that I got an error 500, the php artisan command displays the following

PHP Fatal error:  Uncaught Error: Call to a member function connection() on null in /var/www/eyeframe-laravel/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1058
Stack trace:
#0 /var/www/eyeframe-laravel/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1024): Illuminate\Database\Eloquent\Model::resolveConnection(NULL)
#1 /var/www/eyeframe-laravel/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(859): Illuminate\Database\Eloquent\Model->getConnection()
#2 /var/www/eyeframe-laravel/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(818): Illuminate\Database\Eloquent\Model->newBaseQueryBuilder()
#3 /var/www/eyeframe-laravel/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(802): Illuminate\Database\Eloquent\Model->newQueryWithoutScopes()
#4 /var/www/eyeframe-laravel/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1374): Illuminate\Database\Eloquent\Model->newQuery()
#5 /var/www/eyeframe-laravel/vendor/laravel/framewor in /var/www/eyeframe-laravel/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php on line 1058

about machine
ubuntu+nginx+php7.1
Any advice would be appreciated

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2019-01-24
Nekhamkin @SergeN

Try to "roll back" the optimized cache you created.
artisan
config:cache Create a cache file for faster configuration loading
config:clear Remove the configuration cache file
---
i.e. run php artisan config:clear

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question