This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Core\Service; | |
class Config | |
{ | |
/** | |
* @var string $directory | |
* Directory | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function download(id) { | |
return api.get(`url/${id}`, { | |
responseType: 'blob', | |
}).then((responseBlob) => { | |
let mime = require('mime-types'); | |
let ext = mime.extension(responseBlob.headers['content-type']); | |
const url = window.URL.createObjectURL(new Blob([responseBlob.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.' + ext); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
the docs point to this file as an index of options. | |
when this files is moved, update the docs. | |
*/ | |
/* | |
TODO: figure out booleans so attributes can be defined like: | |
<FullCalendar editable /> | |
*/ | |
export const PROP_DEFS = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array.acceptedGrants.some(r => $authUser.role.grantsSerialized.includes(r)) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-console */ | |
/* eslint-disable no-unused-vars */ | |
const state = { | |
timers: [], | |
}; | |
// getters | |
const getters = { | |
timers: state => state.timers, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<v-btn @click="addPage({ | |
name: 'Item', //Must be unique !! | |
route: '/item', | |
})"></v-btn> | |
</div> | |
</template> | |
<script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-console */ | |
console.log(someThing); | |
/* eslint-enable no-console */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="{{ route('logout') }}" onclick="event.preventDefault(); document.getElementById('frm-logout').submit();"> | |
<form id="frm-logout" action="{{ route('logout') }}" method="POST" style="display: none;"> | |
{{ csrf_field() }} | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onbeforeunload = confirmExit; | |
function confirmExit() { | |
return "You have attempted to leave this page. Are you sure?"; | |
} |