An alternative way to organize the Laravel directory structure

Link – stefanbauer.me

I don't necessarly agree with every detail in this post, but it's very interesting to see how others structure larger projects.

In this article, I would like to show you an alternative way to organize your Laravel directory structure. I think the default structure is fine for the most projects. But when it comes down to larger projects I was looking for a different structure.

Read more [stefanbauer.me]

How we used Caddy and Laravel's subdomain routing to serve our status pages

Link – ohdear.app

My buddy Mattias explains how you can use Laravel and Caddy to handle https traffic to dynamic subdomains.

We recently launched our new Status Page feature. Under the hood, it's using the Caddy proxy server and Laravel's subdomain routing to serve the right status page on the right domain. With this technology stack, we can automatically generate, configure & renewe the SSL certificates for custom domains of our clients.

Read more [ohdear.app]

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

Follow me on Twitter. I regularly tweet out programming tips, and what I myself have learned in ongoing projects.

Every two weeks 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.

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]

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