An alternative way to implement "dynamic" svg is using html-loader.
First, create a component for svg, SvgIcon.vue:
<template>
<div v-html="require(`../../assets/icon-${icon}.svg`)"></div>
</template>
<script>
export default {| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <title>Tailwind Admin Dashboard</title> | |
| <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet"> | |
| </head> |
| #!/bin/bash | |
| function error_exit { | |
| echo "$1" >&2 ## Send message to stderr. Exclude >&2 if you don't want it that way. | |
| exit "${2:-1}" ## Return a code specified by $2 or 1 by default. | |
| } | |
| if [ $# -eq 0 ]; then | |
| error_exit "No input filepath given" | |
| fi |
| function waitForElement(selector) { | |
| return new Promise(function(resolve, reject) { | |
| var runs = 1; | |
| var interval = setInterval(function() { | |
| if (runs >= 30) { | |
| clearInterval(interval); | |
| reject(new Error('max runs exceeded')); | |
| } | |
| var el = document.querySelector(selector); |
An alternative way to implement "dynamic" svg is using html-loader.
First, create a component for svg, SvgIcon.vue:
<template>
<div v-html="require(`../../assets/icon-${icon}.svg`)"></div>
</template>
<script>
export default {| # EN | |
| git checkout master && git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D | |
| # DE | |
| git checkout master && git fetch -p && git branch -vv | awk '/: entfernt]/{print $1}' | xargs git branch -D |
| Array.prototype.random = function() { | |
| return this[Math.floor(Math.random() * this.length)]; | |
| }; | |
| var properties = [ | |
| 'car', | |
| 'house', | |
| 'phone', | |
| 'money' | |
| ]; |
| <?php | |
| use Illuminate\Support\Facades\Log; | |
| use Symfony\Component\HttpFoundation\File\UploadedFile; | |
| /** | |
| * stream - Handle raw input stream | |
| * | |
| * LICENSE: This source file is subject to version 3.01 of the GPL license | |
| * that is available through the world-wide-web at the following URI: |
By default lumen doesn't support laravel file system. In order to integrate to lumen we need follow these instructions:
document_root/configfilesystem to IoC for example in document_root/bootstrap/app.php by adding this code lines:`` $app->singleton('filesystem', function ($app) {
Pre-reqs:
| <?php | |
| namespace App\Console\Commands; | |
| use Elasticsearch\ClientBuilder; | |
| use Illuminate\Console\Command; | |
| class ElasticRecreateIndex extends Command | |
| { | |
| /** |