Install.
composer require phpoffice/phpexcel
(function (context, trackingId, options) { | |
const history = context.history; | |
const doc = document; | |
const nav = navigator || {}; | |
const storage = localStorage; | |
const encode = encodeURIComponent; | |
const pushState = history.pushState; | |
const typeException = 'exception'; | |
const generateId = () => Math.random().toString(36); | |
const getId = () => { |
function getScrollParent(node) { | |
const isElement = node instanceof HTMLElement; | |
const overflowY = isElement && window.getComputedStyle(node).overflowY; | |
const isScrollable = overflowY !== 'visible' && overflowY !== 'hidden'; | |
if (!node) { | |
return null; | |
} else if (isScrollable && node.scrollHeight >= node.clientHeight) { | |
return node; | |
} |
/* Safari and Edge polyfill for createImageBitmap | |
* https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap | |
*/ | |
if (!('createImageBitmap' in window)) { | |
window.createImageBitmap = async function(blob) { | |
return new Promise((resolve,reject) => { | |
let img = document.createElement('img'); | |
img.addEventListener('load', function() { | |
resolve(this); | |
}); |
try { | |
new CustomEvent("IE has CustomEvent, but doesn't support constructor"); | |
} catch (e) { | |
window.CustomEvent = function(event, params) { | |
var evt; | |
params = params || { | |
bubbles: false, | |
cancelable: false, | |
detail: undefined |
postcss: function() { | |
return [ | |
postcssImport({ | |
onImport: function (files) { | |
files.forEach(this.addDependency) | |
}.bind(this) | |
}), | |
customProperties(), | |
autoprefixer | |
] |
Install.
composer require phpoffice/phpexcel
// takes a {} object and returns a FormData object | |
var objectToFormData = function(obj, form, namespace) { | |
var fd = form || new FormData(); | |
var formKey; | |
for(var property in obj) { | |
if(obj.hasOwnProperty(property)) { | |
if(namespace) { |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
// takes a {} object and returns a FormData object | |
var objectToFormData = function(obj, form, namespace) { | |
var fd = form || new FormData(); | |
var formKey; | |
for(var property in obj) { | |
if(obj.hasOwnProperty(property)) { | |
if(namespace) { |
backup-manager is an excelent package, but lack of auto naming feature, here is a workaround using Laravel's Artisan command line tool.
This is the command what we are going to accomplish: