Going serverless with Hugo and Netlify

Original – by Freek Van der Herten – 5 minute read

Our team releases a lot of open source packages. All of our packages are well documented. For the smaller packages, we use a simple readme on GitHub. The bigger packages, like medialibrary and event projector get documented on our documentation site. We recently moved our site from a Digital Ocean…

Read more

The case of the Laravel TestCase

Link – timacdonald.me

Tim MacDonald, a freelance software developer based in Sydney, investigates how to make Laravel tests run faster. Turns out you a lot can be gained by caching the config.

I saw a conversation on Twitter the other day discussing how Laravel was slowing down a test suite. I decided I wanted to dig into this and see if there was anything to it.

Read more [timacdonald.me]

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.

Creating encrypted backups of Laravel apps

Link – simonkollross.de

Simon Kollross explains how to use our laravel-backup package to create an encrypted backup of your Laravel based app.

You should always encrypt backups of your apps and securely transfer them to one or multiple backup destinations. If you encrypt the backups on your server and transfer only the encrypted version, your backups are stored encrypted at rest in your backup destination. Not even your backup storage provider is able to read them.

Read more [simonkollross.de]

How to handle front-end authorization using Laravel, Inertia and TypeScript

Original – by Freek Van der Herten – 6 minute read

Recently Jeffrey Way published a video titled "Frontend Authorization Brainstorming" on Laracasts. In that video, he shows three ways of passing authorization results to the front-end.

Currently I'm working on a big project that uses Inertia, React and TypeScript. In this blog post, I won't cover those things in detail, but I'd like to show you have we, using those technologies, pass authorization (and routes) to the front-end.

Read more

Nobody really owns product work

Link – m.signalvnoise.com

A nice insight by Basecamp engineer Jonas Downey.

Whatever ownership you have over an individual contribution is immediately forfeited the moment you commit the code. At that moment, the work becomes part of the ever-evolving organism that comprises a software system.

Read more [m.signalvnoise.com]

Forget about component lifecycles and start thinking in effects

Link – sebastiandedeyne.com

In a new blogpost, my colleague Seb explains why you should and how you can use useEffect.

React recently introduced a new way to deal with side effects: the useEffect hook. Translating lifecycle methods to useEffect calls can be confusing at first. It’s confusing because we shouldn’t be translating imperative lifecycle methods to declarative useEffect calls in the first place.

Read more [sebastiandedeyne.com]

Laravel Blade Helpers

Link – liamhammett.com

Liam Hammett created a cool package to easily create Blade Helpers in Laravel.

I put together a package that attempts to help make these helper functions that little bit easier to define without the boilerplate of returning the string or having to consider what an expression may be when creating a Blade directive.

Read more [liamhammett.com]

Vue's Darkest Day

Link – dev.to

Daniel Elkington comments on the reactions to an important RFC that adds function-based components to Vue.

Today I was amazed to see the usually positive and friendly VueJS community descend into a bitter war. Two weeks ago Vue creator Evan You released a Request for Comment (RFC) for a new function-based way of writing Vue components in the upcoming Vue 3.0. Today a critical Reddit thread followed by similarly critical comments in a Hacker News thread caused a flood of developers to flock to the original RFC to voice their outrage, some of which were borderline abusive

Read more [dev.to]

A Look At PHP’s isset()

Link – medium.com

Liam Hammet wrote a good blogpost on the isset language construct.

Let’s take a look through how isset behaves and what’s so special about it. Even if you’re a veteran PHP developer, hopefully, you’ll pick up something new here.

Read more [medium.com]

Sending and receiving webhooks in Laravel apps

Original – by Freek Van der Herten – 8 minute read

A webhook is a mechanism where an application can notify an other application that something has happened. Technically, the application sends an HTTP request to that other application. In this blog post, I'd like to introduce you to two packages that we recently released. The first is laravel-webhook-server, which allows you to send webhook requests. The second one is laravel-webhook-client, which makes it easy to receive those webhook request.

Read more

Timelapse of the future

Link –

An amazing video on the fate of our universe.

To me, this overhead view of time gives a profound perspective - that we are living inside the hot flash of the Big Bang, the perfect moment to soak in the sights and sounds of a universe in its glory days, before it all fades away. Although the end will eventually come, we have a practical infinity of time to play with if we play our cards right. The future may look bleak, but we have enormous potential as a species.

Read more

Typed properties in PHP

Link – stitcher.io

Brent wrote another nice post on PHP. This time on the upcoming typed hints feature of PHP 7.4.

Typed class properties were added in PHP 7.4 and provide a major improvement to PHP's type system. These changes are fully opt-in and backwards compatible. In this post we'll look at the feature in-depth.

Read more [stitcher.io]

A package to control the flow of time

Original – by Freek Van der Herten – 2 minute read

Imagine you're building that your app can notify your user, but you don't want to send more than one notification in a timeframe of five seconds. How are you going to test the time aspect? Do you have to create a test that takes five minutes?

Read more

Your first performance budget with Lighthouse

Link – bitsofco.de

Ire Aderinokun, Front-End Developer and User Interface Designer, explains how you can Lighthouse in CI.

Until recently, I also hadn't setup an official performance budget and enforced it. This isn’t to say that I never did performance audits. I frequently use tools like PageSpeed Insights and take the feedback to make improvements. But what I had never done was set a list of metrics that I needed the site to meet, and enforce them using some automated tool.

Read more [bitsofco.de]