Laravel Services Pattern

Starting out Laravel I heard a lot of good advice, particularly on Laracast. But others are confusing, particularly on MVC. The common question is where do you put business logic. You’ll hear that you want to keep your controllers skinny and models thin. What the hell? Using a service layer is the answer if you … Read more

Git : How to remove a big file wrongly committed

This article saved my ass. How to remove a big file wrongly committed. TL;DR If you get this remote: error: GH001: Large files detected. You may want to try Git Large File Storage – https://git-lfs.github.com. remote: error: Trace: 7d51855d4f834a90c5a5a526e93d2668 remote: error: See http://git.io/iEPt8g for more information. remote: error: File coverage/sensitivity/simulated.bed is 102.00 MB; this exceeds … Read more

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