php

4/15/2020

Sometimes the Laravel IDE Helper package can't help you with getting the auto-completion for your facades to work in PhpStorm. So here I have a nice and easy way to handle this when the ide-helper package let's you down.

4/17/2020

Since php7 we can use grouped use statements to make multiple classes of a namespace available through a single use statement. Let's take a look at this approach and how we can benefit from it.

4/16/2020

How much do you really know about composer or the composer commands that you use? Here is a list of the most common composer commands I use.

4/20/2020

I often find it hard to read some other developers PHP classes. Mostly because they are not well structured and I have to jump around a lot. So here is how I try to arrange my code. I hope it gives you a good idea on how to increase the readability of your php classes.

4/25/2020

Avoid long if-elseif-elseif-else and switch blocks in your code and rather make use of array mappings!

5/3/2020

Two simple ways to find values in arrays. Simple and useful 😉

5/4/2020

A quick intro to regular expressions in PHP.

5/7/2020

Create demo content to fill your database or to use in unit tests. A short intro to Laravel factories.

5/8/2020

Today we are going to look at this weird thing called double negations in PHP and what they are used for. And just to be clear, I'm talking about using !! in PHP 😉

5/6/2020

A very short intro on how to create PHPUnit tests for your Laravel packages.

5/9/2020

When initializing a composer package with composer init you are asked for a vendor/package-name. I used to type this out all the time, but today I learned how to set a default value for the vendor name.

5/10/2020

Learn how to add dynamic relationships on Laravel models.

5/12/2020

What the Macroable trait enables you to and how you can use it.