This file contains 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
// in this case Folder structure using nuxt. | |
// store/example.js | |
export const state = () => ({ | |
dataInput: "Hello guys!" | |
}) | |
export const actions = { | |
setDataInput({ commit }, payload) { | |
commit('dataInput', payload.target.value) |
This file contains 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
// ExampleTrigger.vue | |
<template> | |
<div> | |
<input type="text" @input="hello" :value="sayText" /> | |
<p>{{ sayText }}</p> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { |
This file contains 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
// ExampleTrigger.vue | |
<template> | |
<div> | |
<button @click="hello">click me</button> | |
<!-- OR --> | |
<!-- <button @click="$emit('say-hello)">click me</button> --> | |
<p>{{ sayText }}</p> | |
</div> | |
</template> | |
<script> |
This file contains 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 defined('BASEPATH') OR exit('No direct script access allowed'); | |
class UpdatePassword extends CI_Controller { | |
public function index() | |
{ | |
$this->load->view('welcome_message'); | |
} | |
public function doUpdate() |
This file contains 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
// https://auth.nuxtjs.org/schemes/local | |
auth: { | |
redirect: { | |
login: '/auth/login', // defualt login page | |
callback: '/auth/callback' // default login callback | |
}, | |
strategies: { | |
local: { | |
token: { |
This file contains 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
// Documentation you should read: | |
// https://github.com/nuxt-community/auth-module/blob/dev/src/schemes/oauth2.ts | |
// https://auth.nuxtjs.org/providers/google | |
// https://auth.nuxtjs.org/schemes/oauth2 | |
auth: { | |
strategies: { | |
google: { | |
token: { | |
type: 'Bearer', |
This file contains 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
/* | |
** Dibuat oleh: Yusuf Fazeri | |
** No. Peserta: 123456789101-102 | |
*/ | |
/* | |
** [PRAKTIK - 01] | Urutan perintah yang dilakukan untuk membuat database marketdb dan dengan nama collection-nya products adalah.... | |
*/ | |
use marketdb; | |
db.createCollection("products"); |
This file contains 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
/* | |
** Dibuat oleh: Yusuf Fazeri | |
** No. Peserta: 123456789101-102 | |
*/ | |
/* | |
** [PRAKTIKAL - 01] | Syntax query operator untuk mencari data dari collection employees yang umurnya tidak lebih dari 50 tahun adalah.... | |
*/ | |
db.employees.find({age: { $lte: 50 }}) |
This file contains 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
db.products.insertMany([ | |
{ | |
_id: 1, | |
name: "Indomie Ayam Bawang", | |
price: 3000, | |
stock: 30, | |
unit: "pcs", | |
description: "Harga jual perbungkus", | |
categories: ["makanan", "mie"], | |
suppliers: [ |
This file contains 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
{% set dateNow = date|date('Y-m-d H:i') %} | |
{% if(dateNow >= '2021-04-08 00:00') %} | |
// event is closed | |
<div class="col-12"> | |
<div class="alert alert-info" role="alert"> | |
<h4 class="alert-heading">Info</h4> | |
<p>Terimakasih atas partisipasi kamu dalam event ini. <strong>Saat ini event telah ditutup.</strong></p> | |
</div> | |
</div> | |
{% endif %} |