Skip to content

Instantly share code, notes, and snippets.

// Editable fields with a WYSIWYG
$(function() {
$('.selector').editable({
// Set custom buttons with separator between them.
buttons: ["undo", "redo", "sep", "bold", "italic", "underline", "sep", "insertOrderedList", "insertUnorderedList", "sep", "createLink"],
inverseSkin: true,
inlineMode: false,
preloaderSrc: window.location.origin + 'assets/image/preloader.gif',
// This is what matters
@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:
- *