Skip to content

Instantly share code, notes, and snippets.

<script data-turbo-eval="false">
document.addEventListener('turbo:before-render', () => {
let permanents = document.querySelectorAll('[data-turbo-permanent]')
let undos = Array.from(permanents).map(el => {
el._x_ignore = true
return () => {
delete el._x_ignore
}
@daugaard47
daugaard47 / Livewire Intervention Image File Upload
Created August 18, 2020 04:48
Upload images with Livewire and compress with Intervention Image.
//HTML
<div class="avatar-file">
<label class = "text-bh-navy-500">Choose Image</label>
<input type = "file" wire:model = "avatar">
</div>
//LW Component
use WithFileUploads;
public $avatar;
@iamtekson
iamtekson / GeoserverWFSFull.html
Created November 1, 2019 12:02
This is the full reference of the WFS request in leaflet
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css">
<style>
#map {
width: 100%;
height: 500px;
}
</style>
</head>