Recently we have been required to develop for PHP 7.4 while maintaining older PHP 7.2 sites. Using Laravel Valet has become the norm for us, but switching PHP versions is not always obivous. Below is a list of command to change version from PHP 7.4 to PHP 7.2 and back... read more →
Feb
04
Apr
25
Having recently updated Homebrew we realised they have dropped support for PHP 5.6 and 7.0. Even though we agree fully with getting on the latest versions, some times we are forced to use older versions. With brew dropping support we had to find a new way. Using exolnet/homebrew-deprecated we can... read more →
Apr
19
We have been busy using Vuetify for a new project and wanted to improve the selection of a person from a very long list. To avoid loading the entire list every time we wanted to use our API. Returning only a subset of people based on the user's input. Additionally... read more →
Apr
19
While updating from version 2.0.* to 2.3.* to take advantage of the valet use, we hit a bug where sites were no longer being served.After running composer global update to get version 2.3.0 of valet, our sites stopped loading. We got "Site can't be reached error" in Chrome. Checking brew... read more →
Jan
11
Sometimes you might want to disable auto population of WooCommerce fields for logged in users. To do this we make use of the woocommerce_checkout_get_value filter and the if in WC_Checkout get_value(). The if inside get_value() returns the value before checking for logged in users if the value is not null.... read more →
Jan
08
We ran into an issue this morning with Ninja Forms (NF's): How do we run JS code to add Choices.js on field that appear via NF's Conditional Logic? NF's suggest using Marionette and Backbone, but this appear to not work. Instead we used MutationObserver to listen to changes to the DOM. Here... read more →
Dec
16
Below is some simple SCSS using bootstrap to create simple icon buttons like: Simple add SCSS as follows: a.btn-icon, .btn-icon { position: relative; &.btn-outline-primary { &:before { background: $primary; } &:hover { &:before { background: rgba($primary, 0.7) !important } } } &.btn-outline-secondary { &:before { background: $secondary; &:hover { &:before... read more →
Sep
14
When you need to remove the sidebar completely for a Custom Post Type (CPT) in WordPress. First you need to locate or create your template file and remove the call to get_sidebar(). However this can leave you with an empty space where the sidebar use to be. This is because of... read more →
Sep
05
On the rare occasion you need to add a library of code that is not setup for Composer, then follow the X steps below: Download a library e.g Matex PHP Mathematical expression parser and evaluator Copy the library to a project root folder e.g lib Add the path to the... read more →
Aug
31
This is a really simple example of using Laravel's built-in Validation to validate the contents of a CSV File Upload. Having searched around I found the following package Konafets' CsvValidator However at the time of writing, this does not work or install correctly with Composer. Taking Konafet's as a base I created the... read more →