Skip to content

Instantly share code, notes, and snippets.

@IsraelOrtuno
IsraelOrtuno / CarbonLocale.php
Last active February 14, 2021 23:41
Carbon Locale - Use Carbon diffForHuman in different languages with Laravel Lang class
<?php
/**
- * Carbon diffForHumans multi-language.
- * Inspired in a code made by Meroje (https://gist.github.com/Meroje/7783731)
- * This code has been improved as in that original version was only showing
- * past date differences. Not it's able to show differences in past and future.
- *
- * Use it this way:
- *
@IsraelOrtuno
IsraelOrtuno / imagick3.6.0-PHP8-forge.sh
Last active December 28, 2021 12:46
Install Imagick 3.6.0 on PHP 7.4 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.6.0.tgz
tar xvzf imagick-3.6.0.tgz