No need for regex

For simple operations like validating a username, there is no need to use regex. Instead, use PHP’s built in functions from the Ctype-library. $testcase

Laravel Valet with Ngrok and reserved domains

When testing webhooks, Ngrok is unbeatable. But it’s super annoying to set up a different domain every time. Also, Ngrok has a hard limit of 20 requests per minute. Luckily...

Laravel Valet 502 bad gateway - upstream sent too big header

Got a 502 bad gateway error? First, check the Nginx logs located in ~/.config/valet/Log/nginx-error.log The last error reveals an error that regards too big headers. By default the Nginx...

Chrome Dev tools snippets

Better logging Instead of console.log use console.table Set a breakpoint in code. debugger Debug a page redirect or reload window.addEventListener("beforeunload", function() { debugger;...

Setup Xdebug with PHP7.2, PHPStorm and Laravel Valet

This walkthru assumes that you have Laravel Valet, PHP7.2 installed. If not, follow these instructions: https://laravel.com/docs/5.8/valet#installation Xdebug is no longer available from Homebrew as shown in tutorials for PHP7.1,...