Skip to content

Instantly share code, notes, and snippets.

View eugenefvdm's full-sized avatar

Eugene van der Merwe eugenefvdm

View GitHub Profile
@eugenefvdm
eugenefvdm / ImageCompression.php
Last active October 29, 2022 14:14
The PHP Intervention library is used to resize an image and center / crop it on a canvas and encode / save it as .webp. The original image is kept. Works with Filamentphp and Livewire
<?php
namespace App\Traits;
use App\Services\ImageService;
use Illuminate\Database\Eloquent\Model;
trait ImageCompression
{
protected static function bootImageCompression(): void
<?php
/*
* disable_invoice_notification.php
*
* Version 1.0
*
* An action hook for WHMCS that allows you to disable sending of invoice reminders for selected payment methods.
*
* To install:
* - Set the array of payment methods that should not send invoice reminders. Typically debit order / direct debit.