Oh Dear is the all-in-one monitoring tool for your entire website. We monitor uptime, SSL certificates, broken links, scheduled tasks and more. You'll get a notifications for us when something's wrong. All that paired with a developer friendly API and kick-ass documentation. O, and you'll also be able to create a public status page under a minute. Start monitoring using our free trial now.

Reducing Complexity with Guard Clauses in PHP and JavaScript

Link – engineering.helpscout.com

In this old, but still relevant, blog post Craig Davis explains what guard clauses are and how they can be used to clean up your code.

We’ll first explore several versions of a sample method from a hypothetical billing system. For these purposes, we’ll assume this is code in an existing system and we’ll look at refactoring it to reduce complexity and make it easier for a programmer to understand. The first example will be trivial enough to easily understand, but we’ll build on it in the final examples.

Read more [engineering.helpscout.com]

Stay up to date with all things Laravel, PHP, and JavaScript.

You can follow me on these platforms:

On all these platforms, regularly share programming tips, and what I myself have learned in ongoing projects.

Every month I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.

How to integrate Elasticsearch in your Laravel App

Link – madewithlove.be

Tony Messias wrote a good post on the Madewithlove blog on how to get started using Elastichsearch in a Laravel app.

One of the most popular ways is using Elasticsearch. It is a very powerful tool and it comes with a variety of useful features and complementary tools. We are going to cover the basics here and leave you with some links for more resources if you want to dig further.

Read more [madewithlove.be]

You should not run your mail server because mail is hard.

Link – poolp.org

Contrary to the title, Gilles Chehade that it's acutually doable running your own mailserver.

TL;DR: Mail is not hard: people keep repeating that because they read it, not because they tried it. Big Mailer Corps are quite happy with that myth, it keeps their userbase growing. Big Mailer Corps control a large percentage of the e-mail address space which is good for none …

Read more [poolp.org]

Small Wins

Link – davidhemphill.com

Some words of wisdom by David Hemphill

Don't be upset you didn't finish the big feature early in the week. Be glad you figured out what you need to do to finish it in the next few days.

Read more [davidhemphill.com]

Watch the Flare reveal live

Original – by Freek Van der Herten – 2 minute read

These past eight months Marcel Pociot, me and our teams at Beyond Code and Spatie have been working on a secret project called Flare. We believe that Flare is going to change the way you work with Laravel. To be kept in the loop subscribe to our mailinglist.

We are going to launch it this Friday at Laracon EU at 16.30 local time (15:30 CET). The Laravel News YouTube channel will live stream the launch. You can watch the stream right below.

Read more

Multiple forms with same input names on one page

Link – stefanbauer.me

Stefan Bauer explains how to handle error message when you have multiple forms on one page

Here's another tip! Even if it's documented here I just wanted to show it. Here's the deal: Imagine you have multiple forms one page. For example one contact form and another newsletter signup form. Both of them might have an email field. So who do you know which email field doesn't validate and throws an error?

Read more [stefanbauer.me]

Supercharging common controllers

Original – by Freek Van der Herten – 2 minute read

From time to time our team needs to create fairly complicated CRUD interfaces from scratch. While this isn't rocket science, there surprisingly aren't that many good resource out there on how to do this. That's why our team dove in and published a couple of packages that can help create modern CRUD…

Read more

Automatically detect broken links after a deploy

Link – ohdear.app

You can use the Oh Dear! API to automatically perform health checks on your app after a deploy.

You can use our API to trigger an on demand run of both the uptime check and the broken links checker. If you add this to, say, your deploy script, you can have near-instant validation that your deploy succeeded and didn't break any links & pages.

Read more [ohdear.app]