With all the various sources for news about Laravel I still think there is more room for a small newsletter to inform about the weekly occurring changes in the Laravel ecosystem. Without further words let's dive right in! With Laravel 7 we got the custom Casts feature. In v7.10 Voidgraphics got us the artisan make:cast command. For those of you who are interested in how this feature was implemented, take a look at the changed files and see how easy Laravel makes it to create a...

2019 started pretty ruff for me. I had no clients (which meant no source of income), not much money left in my bank account and I had to provide for the two. I struggled to gain new clients at the start of the year. The recent loss of my main client and him refusing to pay me for my work from last year combined with my struggle to acquire new clients lead me to question whether I have what it takes to run my own company. Luckily enough I had someone on my side who wasn't getting tired of...

When you want to customize the standard Laravel password reset notification the official documentation recommends you to overwrite the sendPasswordResetNotification() method on your User model and just reference a different notification. There is a much easier way to modify the standard notification without creating a completely new notification. Turns out the Illuminate\Auth\Notifications\ResetPassword notification does have a...

Sometime after I started using PHP 7.3 I noticed running my tests locally took much longer than before. Instead of a few seconds, the tests now took a few minutes, which is less than optimal when you try to develop in a TDD manner. I don't know how I came to think about disabling xdebug but I did. The test running time decreased to a few seconds again and for me it wasn't a pain in the ass to develop in TDD anymore :). If you only want to disable xdebug temporarily...

When debugging and you are not sure whether the cache is part of the issue it's always nice to temporarily disable it to get to the bottom of what's going on. What many people do not know and what isn't documented in the Laravel documentation is the option to disable the cache by using the Illuminate\Cache\NullStore. There is not much to do to enable the null or none cache driver. You only have to tweak the config/cache.php and modify your...

Today my client asked me to only allow the user to view models in a specific state. The application uses a custom engine for the user interaction and Laravel Nova in the backend. Since the code responsible for the user interaction is quite huge and I didn't want to look up every model query and apply a custom query I figured out adding a global scope would be the easiest way to accomplish this. Unfortunately, we have quite a few jobs in the backend which require to access all models and lazy...

EDIT: It seems like I was unable to think of the simplest of all solutions would suffice my needs. Turns out a simple where() call does the job - sorry for bothering! You can still read on and take the following as an example on how to use macros! In one of my recent client projects, I had to query the latest records from the last few hours/minutes. I thought I'd be able to leverage the existing whereDate() method from Laravel's...

Since I did only find the official Netlify documentation - which does a pretty good job at explaining everything, but I wish it would be a bit shorter. Go to Custom Domains https://app.netlify.com/sites/ your_site_name /settings/domain#custom-domains Change DNS Settings on your domain's provider to point to netlify.com DNS Servers. Select the ... and select Go to DNS Settings add the Netlify nameservers to your domain service (dns1.p03.nsone.net,...

Everybody knows the feeling when suddenly motivation drops. You don't feel hunger nor thirst, just lying in bed or sitting on the couch is enough. In fact, you don't want to do anything at all. You want to be alone because something has happened which hit you hard on an emotional level. These strikes could be caused by stressful work or just realizing something isn't going to work out as you thought it would be. When losing motivation I do not only lose the will to do anything, I also get...

Sign up for my newsletter

If you enjoyed this article, sign up for my newsletter to be the first to know when a new article is published.