Perry James

Template refs in Vue 3, Typescript and Composition API

Template refs are often used to manipulate DOM elements, this can become challenging in Vue 3 Composition API with Typescript because of the way Vue 3 infers the type from the `ref()` function.
Posted: 23 Apr 2021

Seeding Users with Teams in Laravel 8 with Jetstream

If you're using Laravel Jetstream with teams, you may have found you're getting the error Trying to get property 'id' of non-object a whole lot during testing. This is because when you create a User from a factory, the team and team_user pivot table are not automatically created or filled.
Posted: 10 Sep 2020

Using Scopes To Get A Subset Of Users

A brief look at using local scopes to get Users with a given Role.
Posted: 25 Jul 2020

Add role checking middleware with multiple parameters in Laravel

When you have users with multiple roles, for example Admin, Subscriber, Author etc. You may want to limit access to certain pages to a role or many roles, so you need to pass them as parameters to your middleware. This article explains how to acheive that in Laravel.
Posted: 10 Jul 2020 / Updated: 23 Jul 2020