#illuminate/http based standalone package without full Laravel app

3 messages · Page 1 of 1 (latest)

cosmic bloom
#

hello there, im trying to write a little HTTP client customized for a REST endpoints API within the illuminate/http package. i dont want to use a full-bloated laravel app for this but instead only use the illuminate/http (and if necessary, some others obv) packages. i got it all done but i get following error/issue:
Fatal error: Uncaught RuntimeException: A facade root has not been set. in /var/www/html/vendor/illuminate/support/Facades/Facade.php:350 Stack trace: #0 /var/www/html/src/v1/Client.php(38): Illuminate\Support\Facades\Facade::__callStatic('send', Array) #1 /var/www/html/index.php(9): Foo\Bar\v1\Client->send('GET', Array) #2 {main} thrown in /var/www/html/vendor/illuminate/support/Facades/Facade.php on line 350

gaunt lion
#

I have no idea what you mean by trying to write endpoints to an API within the illuminate/http package. It's an HTTP client for making requests to API's and whatnot.

Anyways, at a glance it seems like you're trying to use the client with a facade. Which will not work outside Laravel, unless you configure all of it.