Redis Cheatsheet for Mac

Credit goes to @tommysmile. type below: To have launchd start redis now and restart at login: Or, if you don’t want/need a background service you can just run: Test if Redis server is running. If it replies “PONG”, then it’s good to go! Location of Redis configuration file. Uninstall Redis and its files.

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

Adding PHP extensions to Heroku

Use of undefined constant FTP_BINARY

Another wild goose chase. PHP 7 does not come with it’s ftp extension enabled by default. Typically you’d uncomment the line “extension=ftp.so” in the php.ini file. However, Heroku doesn’t support php.ini. In their docs, Heroku asks users to add a “.user.ini” file. Which didn’t work for me and some other folks who write blogs. Even … 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