laravel

4/10/2020

Sometimes you need a slug version of a given string but don't want to include some external package. So here is the easiest way I could find to create slug representations of strings.

4/12/2020

Today I was facing another mysql issue when working on my new side project. The issue was that I was writing more jobs into the jobs table than the database queue driver could work off. Here is how I solved this issue and how I would recommend everyone to setup their queue on small servers.

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/8/2020

I see a lot of packages that could make use of Laravel facades to make their services more accessible. But I completely agree with everyone who would say that the Laravel facades documentation is kinda hard to read. So here is a quicker version to get you started.

4/18/2020

Some time ago I stopped to maintain the $fillable attribute on my Laravel models, but rather started filling the $guarded attribute. And the reasons are pretty obvious if you think about it.

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/6/2020

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

5/7/2020

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

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.