Skip to content

Instantly share code, notes, and snippets.

<template>
<q-page class="flex flex-center">
{{ monthsAgo }}
</q-page>
</template>
<script>
export default {
name: 'PageIndex',
mounted () {
{ id: 1, name: "Elemento 1", parentId: null }
<template>
<div>{{ lastLogin }}
</template>
<script>
export default {
computed: {
lastLogin () {
return this.$options.filters.formatDate(this.user.LastLogin)
}
<template>
<div>{{ user.LastLogin | formatDate }}</div>
</template>
Vue.filter('formatDate', function(value) {
if (value) {
return moment(String(value)).format('DD/MM/YYYY hh:mm:ss')
}
return 'N/A';
});
<?php
namespace App\Http\Controllers;
use App\Statistic;
class StatisticController extends Controller
{
public function stats() {
$period = request('period');
$statistics = Statistic::select('columns')
<?php
namespace App\Http\Controllers;
use App\Statistic;
class StatisticController extends Controller
{
public function stats() {
$period = request('period');
<template>
<div id="e3" style="width: 500px; max-width: 600px">
<v-toolbar color="pink">
<v-toolbar-side-icon></v-toolbar-side-icon>
<v-toolbar-title>Formulario de posts</v-toolbar-title>
<v-spacer></v-spacer>
</v-toolbar>
<v-card>
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "*",
"Resource": "arn:aws:s3:::sls-course-dev/*"
}
storageRef.child(`/products/${fileId}`).getDownloadURL().then(url => {
let product = firebase.firestore().collection('products').doc(id);
return product.update({
url: url,
file_id: fileId
});
});