Curl Error Using Guzzle using Laravel Valet and Passport

This is a niche issue with: Laravel, Valet, Passport, Guzzle, Curl, API If you’re using Laravel Passport and you’re doing something like this: use GuzzleHttp\Client; try { $client = new Client(); $client->post(‘site.test/oath/token’, [some params]); And you get an error “Laravel guzzle cURL error 6: Could not resolve host” while making an api post request. Check … Read more

Tips on using Laravel Telescope in Production

The Telescope documentation does not seem complete. There are several hoops, troubleshooting, and errors one might experience getting Telescope up and running in a production environment. Here’s a handful of things you might want to do or check if you run into any problems. Run $ php artisan config:cache Remove Authorize::class from config/telescope middleware section … Read more

Laravel Error 419 Session Expired On Post Requests

Laravel's default 419 error page

Clear your cache Getting a 419 error on login or posts requests? The first step is to check the cache and clear it. From your terminal, you can run. This is common during local development from constantly changing configurations. Check CSRF verification. Laravel automatically generates a CSRF “token” for each active user session managed by … Read more

Reaching the Memory Limit Running Laravel Valet

php memory limit ini file

If you ever get this error “PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted ” while running Laravel Valet, check out the path below for Mac users. It seems that this is the specific memory-limit ini file that Valet uses, and you can edit the memory limits there. /usr/local/etc/php/7.0/conf.d/php-memory-limits.ini Note that 7.0 is the … Read more

Laravel Nginx and MySQL with Docker

Handy guide from Digital Ocean on how to set up the three containers. The only discrepancy I found was that nano wasn’t included in the containers, so you’ll have to use vim instead.