fresh installation of laravel 6. follow all of the implementation instructions.
Add 'use Searchable;' to the App\User model.
put $u = new User(); in a test.
run test.
get back the error:
1) SolrEngineTest::test1
RuntimeException: A facade root has not been set.
/var/www/laravel-scout-solr-iateadonut-laravel6/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:258
/var/www/laravel-scout-solr-iateadonut-laravel6/vendor/laravel/scout/src/ModelObserver.php:31
/var/www/laravel-scout-solr-iateadonut-laravel6/vendor/laravel/scout/src/Searchable.php:27
/var/www/laravel-scout-solr-iateadonut-laravel6/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:220
/var/www/laravel-scout-solr-iateadonut-laravel6/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:200
/var/www/laravel-scout-solr-iateadonut-laravel6/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:187
/var/www/laravel-scout-solr-iateadonut-laravel6/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:166
/var/www/laravel-scout-solr/tests/SolrEngineTest.php:20
You'll get this same error by running the test that comes with the package.
You do not get this error running in a route, only through a test.
Detailed description
fresh installation of laravel 6. follow all of the implementation instructions.
Add 'use Searchable;' to the App\User model.
put $u = new User(); in a test.
run test.
get back the error:
You'll get this same error by running the test that comes with the package.
You do not get this error running in a route, only through a test.
Your environment
php artisan --version Laravel Framework 6.20.16