We’ve started a new mailing list to communicate new content and links to the community. You can sign up using the form below. We don’t like having our inbox filled up with SPAM so you can be assured that we won’t be sending you any. 😆
The PHP CLI has a cool feature (
-l) that allows you to check a file to see if it has any syntax errors:
The downside to this is that it doesn’t work on a whole directory. So unless you’re willing to add every new file to a script it’s not a quick way to check all your files before deployment.
With some command line magic we can have it run on all the PHP files in our application:
I find it helpful to run my template files through this process as well:
I’ve had trouble knowing what to put in my migrations’
down() functions. The Laravel Docs include a lot of information but I wanted a quick reference guide for myself to convert Laravel migrations to MySQL commands because that’s what I’m used to. :-)
I also spend some time compiling this into a Cheetsheet if you want a printable version of this post.Read More
January’s links.Read More
Welcome to the new layout for thisprogrammingthing.com! This redesign has been on our minds for a while now and it’s great to be able to finally get it out to everyone!
For the last several months, I’ve been using Visual Studio Code for all my PHP projects. I started using Better PHPUnit to run my unit tests because it has a quick keyboard shortcut to run a specific unit test from inside Code. I just set Better PHPUnit up on a new computer I forgot a couple of hoops I had to jump through in order to get it to run inside my Vagrant VM. This post is documentation so I won’t forget and that will hopefully help someone else.Read More
December’s links.Read More
The other day I had an Eloquent query that wasn’t returning what I expected it to. I started looking for a way to determine what was happening “under the hood” so to speak. It turns out it’s very simple.
This will output something like the following:
Can we all agree
dd() is the best thing for quick debugging ever?
subscribe via RSS