Blog

How to use Google Drive storage as filesystem in Laravel

Published 20 September 2020

For some projects, we use Google Drive (in combination with a personal @gmail.com account or G Suite account) as a storage provider in Laravel projects. In this post, I'll show how you can set up Google Drive as a storage disk via the Laravel filesystem.

Moving 27K unique images from Spatie medialibrary local to s3 storage using Laravel Queue

Published 17 September 2020

We didn't expect that the project ever reached this milestone, so we stored all the images on the server itself. After around 2 years the monitoring service told us we had around 180GB of images stored in the project. But why are we now moving the images to s3 instead of local storage?

Laravel Jetstream with Inertia.js not recognizing changes

Published 11 September 2020

When developing your project using Laravel Jetstream and are using Inertia.js, you have to version your HTTP requests. This will force the front-end to refresh the page and all static assets like javascript/css.

One line boilerplate for Laravel SaaS project

Published 09 September 2020

Want to know how to set up a Laravel SaaS boilerplate with one command?

How to upgrade to Laravel 8

Published 08 September 2020

Every 6 months there is an upgrade to the Laravel framework. To keep up to date with the latest version I've created a flow for our projects on how to upgrade to the latest Laravel release.

Create terminal art using figlet

Published 08 September 2020

Some projects have nice terminal art, for example the name of the project. So how can you make this yourself?

HTML autocomplete "one-time-code"

Published 07 September 2020

Apps and websites on iOS can autocomplete one time codes sent via SMS. But how can you implement this on your website?

What is Real User Monitoring (RUM)?

Published 03 September 2020

Since the latest Google update about Web Vitals, search trends show an interest in the optimization of real user experience. In this post, I'll explain what Real User Monitoring is and how you can use it.

Mollie gebruiken voor Moneybird facturen online te betalen [Dutch]

Published 17 August 2020

De laatste jaren maak ik veelal gebruik van verschillende oplossingen, om op een eenvoudige manier je klanten de facturen uit Moneybird te laten betalen maak ik gebruik van Mollie.

Facebook Messenger embed: chat as a guest

Published 05 August 2020

For a few days, Facebook Messenger let guests chat with your embedded chat window. This also enables users without a Facebook account to chat with you on your website.

Google Featured snippet links directly to content, how does this work? (Scroll to Text Fragment)

Published 27 July 2020

Since last week (22 July 2020) there is a featured snippet linking to my blog when people search on Google. Since then I've seen url's that contain "#~:text=" in the URL. What's this about?

Split a file into smaller chunks

Published 23 July 2020

To limit the size of files being between our servers we chunk them before sending over the internet. The servers will make more requests but the it's easier to retry the smaller chunks than a full 50GB file.

Custom error page for Laravel Signed Route

Published 11 July 2020

Every wanted to make a custom error page for Laravel Signed Route?

Moneybird herkent geen UBL facturen [Dutch]

Published 03 July 2020

De laatste tijd hebben wij veel automatisering doorgevoerd voor de klanten, waaronder verwerken van UBL facturen. Maar hoe weet je nu of Moneybird de facturen kan herkennen?

Setup Google Indexing API in Wordpress with Rank Math

Published 28 June 2020

Some projects are made with Wordpress and contain information about Job Posting. To get these pages sooner in the Google index I use Rank Math with the "Wordpress Instant Indexing Plugin". Want to know how you can set up this plugin? I explain more about it in this post!

How to set up a Laravel application that can handle a lot of visitors [+ useful tools]

Published 03 June 2020

This is a topic that's a bit difficult to explain and what is "a lot of visitors". In this post I tried to explain how we (in the projects I've been working on) setup our applications to handle millions of visitors every month.

Optimize SSL on Laravel Forge [Extra security headers for nginx]

Published 13 May 2020

This list contains some extra (security) headers for sites/servers you deploy using Laravel Forge.

"Inline static caching" or "memoization"

Published 11 May 2020

Little inline caches for when a method is called multiple times within a request and don't want to "re-compute" that value.

HTML form input "enterkeyhint"

Published 15 April 2020

User agents can support the "enterkeyhint" attribute on form controls.

Laravel Schema Dump: how to speed up your migrations?

Published 08 April 2020

Large or long-lived applications can have this issue, a huge list of migration files that were created more than a few years ago. These will never change again and are slowing down your tests. How can you improve this?

Whoops, I made a typo in my commit message

Published 02 April 2020

Just a reminder for myself. Fix your commit messages if they contain misspelled words...

Google Indexing API for Laravel

Published 20 March 2020

Almost all the projects I work on are built on Laravel. For those projects, I needed a simple way to index pages inside Google. Let's make this with Google Indexing API.

Enable xdebug only for PHPUnit command line

Published 18 March 2020

I don't want to enable xdebug for my normal PHPUnit test but only for the coverage report. Therefor I made a shortcut.

How I managed to get a complete 100 score on Lighthouse

Published 07 January 2020

By the end of September 2019 I challenged myself to get a website to a 100 score in Lighthouse. But why is this important?

Moneybird facturen versturen na een succesvolle betaling [Dutch]

Published 17 December 2019

Voor een aantal webshops, welke facturen versturen via Moneybird nadat er een succesvolle betaling is gedaan, had ik een probleem waarbij de eindklanten vragen stelde over een ontvangen factuur. "Waarom krijg ik een factuur met een te betalen bedrag erop terwijl ik net heb betaald via iDEAL?".

Check known security issues with your composer packages

Published 04 December 2019

As mentioned in my previous blogpost, "Composer dependencies up-to-date?", I continue with the automated composer checks. This time I took a look at Sensiolabs security checker.

How to automatically update Laravel composer dependencies?

Published 03 December 2019

As you all know, it's really important to keep all your composer dependencies up-to-date. Laravel has a weekly release, so here are a few ways to check how you can do this!

Cache static pages in Laravel by Cloudflare CDN

Published 02 December 2019

Some of the websites I made don't need to be updated very often, but they receive in some periods a lot of traffic within minutes. To make the website faster and reduce the amount of database queries executed I want my CDN (in this case, Cloudflare) to cache those static pages for 5 minutes.

Redirect www to non-www URLs in Laravel

Published 28 November 2019

I want my site to show as robindirksen.nl and not www.robindirksen.nl in the search results or any other place, but how do you handle the removal of www in your application so you don't lose your visitors?

Disable HTTP sessions in your Laravel API endpoints

Published 25 November 2019

The most important and used endpoints on most of the application I work on is the API. These are both public as internal API's. After we disabled the HTTP sessions for the API endpoints we saw a stability improvement.

How to force HTTPS in Laravel

Published 23 November 2019

Sometimes people don't link to the secure (https) version of your site, this can be an old link or the user who placed the link is just lazy to add the extra character.

Remove index.php from the URL in Laravel

Published 23 November 2019

I've discovered an unwanted behaviour in one of my projects. This was not used to be so, Google indexed a url with index.php in it and gave a duplicate canonical notification.

Laravel Valet not starting with "kdc" running on port 88

Published 23 November 2019

When you have Laravel Valet installed on your Mac and uses the Sharing feature from MacOS there will be a program running on port 88. It's an authentication method connected to AFP (Apple Filing Protocol) or SMB (Samba) file sharing. To disable it, you have to disable the sharing features on your mac.