The site stopped working on the Laravel 5.6 framework, php artisan, composer commands do not work. An error is issued in all cases:
PHP Notice: Undefined variable: factory in /project/config/database/factories/UserFactory.php on line 16
In UserFactory.php line 16:
Call to a member function define () on null
I tried to update composer (composer update, composer self-update), reinstall the framework (composer install), start / stop the php artisan up / down application. The console still has the same error. In the browser when opening the site, it is the same:
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Call to a member function define () on null /project/config/database/factories/UserFactory.php
I would be very grateful for the informative answer!