Skip to content

Instantly share code, notes, and snippets.

Israel Parra uno-de-piera

View GitHub Profile
View posts.vue
<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>
View policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "*",
"Resource": "arn:aws:s3:::sls-course-dev/*"
}
View upload.js
storageRef.child(`/products/${fileId}`).getDownloadURL().then(url => {
let product = firebase.firestore().collection('products').doc(id);
return product.update({
url: url,
file_id: fileId
});
});
View guest.vue
<script>
import navigationMixin from '@/mixins/navigation';
export default {
name: "guest",
mixins: [navigationMixin],
}
</script>
View HomeController.php
<?php namespace App\Controllers;
class HomeController extends BaseController
{
public function index () {
return $this->blade->render('home', ['name' => 'Cursosdesarrolloweb']);
}
}
View BaseController.php
<?php namespace App\Controllers;
use CodeIgniter\Controller;
use Jenssegers\Blade\Blade;
class BaseController extends Controller
{
protected $blade;
public function __construct () {
View component.vue
<template>
<div class="cmp" v-if="id">
{{ id }}
</div>
</template>
<script>
import {createNamespacedHelpers} from 'vuex';
const { mapActions, mapState } = createNamespacedHelpers(
"users"
View Component.js
watch: {
'component_data.dato2': function (newVal, oldVal) {
// DO STUFF
}
},
View Component.js
data () {
return {
component_data: {
dato1: 1,
dato2: 2,
dato3: 3
},
}
}
You can’t perform that action at this time.