laravel

All my posts about laravel.

Tips to Speed up Your Phpunit Tests

laravel-news.com

On the Laravel News blog, Tim MacDonald wrote a nice collection of tips on how to make PHPUnit tests run faster.

Having a fast test suite can be just as important as having a fast application. As a developer, getting feedback quickly about the state of your code allows for a much quicker development turnaround. Here we are going to run through some tips you can implement today to make your tests run faster.

Read more [laravel-news.com]

Join 9,500+ smart developers

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

laravel-backup v6 has been released original

by Freek Van der Herten – 4 minute read

laravel-backup is a Laravel package that can backup your application. It can create a zip containing a dump of your database together with other files that you can select. Using the power of Laravel's filesystem abstraction this zip can than be uploaded to one or more remote filesystems. The package…

Read more

Preventing spam submitted through forms original

by Freek Van der Herten – 2 minute read

When adding a form to a public site, there's a risk that spam bots will try to submit it with fake values. We recently released a new package, called laravel-honeypot, that can detect these spammy requests. How honeypots work The majority of spam bots are pretty dumb. You can thwart most of them by…

Read more

A recap of 2018 original

by Freek Van der Herten – 9 minute read

Now that 2018 is coming to a close, a lot of awesome people have written a recap post. Here's mine! The most significant change on a personal level is that my girlfriend an I bought a house in Ghent. Together with our two kids, we moved this summer, and we now live in an awesome house that's very…

Read more

Handcrafting mocks original

by Freek Van der Herten – 8 minute read

In an application I was working on I wanted to implement automated tweets. Of course, this logic should also be tested. In this blogpost I'd like to show you how you can easily handcraft your own mocks. Setting things up Let's first take a look at how you can tweet something in PHP. We're going to…

Read more

How to backup your app and database to Google Drive

medium.com

Dennis Smink wrote a nice post on how you can use our backup package to backup your application to Google Drive. He includes all steps necessary to authenticate with Google Drive.

Backups are important, period. You will be needing these once your server or server provider suddenly dies. In this tutorial I will cover how to setup Google Drive backup, with Spatie’s backup package, Googles Flysystem and Laravel.

Read more [medium.com]

Giving collections a voice

timacdonald.me

Tim MacDonald demonstrates how you can add logic to a custom collection.

Laravel collections have become an essential part of my codebases and I couldn't imagine working without them. I have found giving collections the voice of the problem domain makes for a much nicer API when compared to the generic collection methods.

Read more [timacdonald.me]

? Four years of murze.be ?

4 years ago I started this blog as a tool to share interesting blogposts I found around the web. On each anniversary of my blog I published some interesting stats on the blog. This year is no different.

Between November 2017 and november 2018 this blog served 728 243 pages, a good increase compared to the 591 113 pageview from the previous period. There are 1 217 published posts, of which 195 I've written myself. The others ones are links to other blogs.

Last year in November I moved this blog from WordPress to a custom made Laravel app. A few months ago I removed the handcrafted admin section in favor of Laravel Nova. I'm really glad that I now have full control over my blog and not tied to WordPress anymore. I also opensourced the Laravel app. You can find the source code in this repo on GitHub.

These were the ten most visited posts of the past 12 months:

  1. My current setup (2018 edition)
  2. How to upgrade from PHP 7.1 to 7.2 on MacOS
  3. Introducing our Nova packages
  4. Handling CORS in a Laravel application
  5. laravel-medialibrary v7 has been released
  6. Breaking Laravel's firstOrCreate using race conditions
  7. When empty is not empty
  8. Doing less
  9. A better way to register routes in Laravel
  10. Using Content Security Policy headers in a Laravel app

I do hope you still enjoy reading this blog!

Read more