Below you will find pages that utilize the taxonomy term “laravel”
Posts
How to mock a GuzzleHttp client that makes a request to a third-party API in a Laravel feature test?
In a Laravel project I have a feature test in which I test an internal endpoint. The endpoint has a Controller calls a method on a Service. The Service then tries to call a third-party endpoint. It is this third-party endpoint that I would like to mock.
I have looked at Guzzle’s documentation, but it seems like image/svg+xml the MockHandler strategy requires you to execute the http request inside of the test, which is not wat I want in my test.
Posts
Base table or view not found: 1146 Table doesn't exist
When trying to use a Filament resource while also using Doctrine as an ORM, one might encounter the following error:
Illuminate\Database\QueryException SQLSTATE[42S02]: Base table or view not found: 1146 Table 'underhold.suppliers' doesn't exist (SQL: select * from `suppliers` where `id` = 8 limit 1) http://localhost/admin/resources/suppliers/8/edit In my case, the database table did not have a plural name and was simply named supplier. To let filament know what the correct table name is, I extended my model from Eloquent and specified the table name from within the model: