View e-mail in browser

newsletter #72

Hi, welcome to the 72th newsletter! 

Calling an invokable in an instance variable
Invokables in PHP are classes that you can use a function. Here are 3 ways of calling them.

How PHP conferences can be improved
In my mind the traditional formula of PHP conferences with 50 minute talks, Q&A's, ... can be greatly improved.

A better way to register routes in Laravel
In modern versions of Laravel you can register routes with a tuple notations. This has a few nice advantages.

Building a realtime dashboard powered by Laravel, Vue, Pusher and Tailwind (2018 edition)
At Spatie we have a tv screen against the wall that displays a dashboard. In this blogpost I explain how it works and which features we added this year.

Monitor your entire website, not just the homepage (sponsored link)
Oh Dear! can detect broken links and mixed content on all pages of your website. And of couse it can check uptime and SSL certificates too. There's an easy API, a Nova Tool and it can import sites from Forge. Try it out for free for 10 days.

Failing gracefully on stage
Failing on stage can happen to everyone, there's no shame in that. 

Loading Eloquent relationship counts
There are three ways of loading relationships in Laravel. Tim MacDonald, a freelance dev based in Sydney, explains them all.

The Laracon Australia 2018 videos have been released
This year Laracon AU was held for the very first time. According to what I read on Twitter Michael Dyrynda did an awesome job organising it. The…

How To Publish a Vue Component as an NPM Package
Caleb Porzio, developer at Tighten Co, recorded a video that explains how to publish a Vue component as a package

Meanwhile on Twitter

On Twitter I see a bunch of people regularly tweeting very nice code snippets.

Determining if the sun is up with PHP

Use declarative names for your data attributes

Useful links from the archives

On migrating my blog from WordPress to a Laravel application
Regular visitors will have noticed that last week this blog got a new coat of paint. This new layout isn't just a new WordPress theme. This blog is now a Laravel app.

Reducing the size of a css file
PurgeCSS is a tool that can reduce the filesize of a CSS file. It does this by removing any css classes that are not used. 

PHP Versions Stats - 2017.2 Edition
Every six months Jordi Boggiano, co-creator and maintainer of Composer/Packagist, publishes statistics on which versions of PHP are used.

Improve the error output of console commands in a Laravel app
If you execute an Artisan command and something goes wrong, the error output is not terribly detailed. Let's fix that!

In this blogpost by Tailwind CSS co-creators Adam Wathan and Steve Schoger share lots of actionable tips to improve the layout of your site.

Anatomy of a PHP Hack
Aaron Saray recently found some rogue code on a hacked website and investigated what it actually does.

Shorthand comparisons in PHP
My colleague Brent published a new blogpost on how the ternary and null coalescing operators work in PHP.

The Cost Of JavaScript
Probably you know that that keeping the disk & transfer size of a JavaScript file low is pretty important. But have you considered the time needed to execute the code?

How to Read Big Files with PHP (Without Killing Your Server)
In a new blogpost published at Sitepoint, Christopher Pitt explores the various ways you can handle reading big files in PHP.

Advertisement opportunities at

You are receiving this mail because you've subscribed at