Skip to content

Instantly share code, notes, and snippets.

View DeaVenditama's full-sized avatar

Dea Venditama DeaVenditama

View GitHub Profile
@DeaVenditama
DeaVenditama / layout.php
Last active May 19, 2021 04:28
app\views\layout.php - simpeg_ci4
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SIMPEG</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
<link rel="stylesheet" href="<?= base_url("adminlte/plugins/fontawesome-free/css/all.min.css") ?>">
<link rel="stylesheet" href="<?= base_url("adminlte/dist/css/adminlte.min.css") ?>">
@DeaVenditama
DeaVenditama / TransactionModel.php
Created May 10, 2021 04:16
Contoh Penggunaam Transaction di CI4
<?php namespace App\Models;
class TransactionModel
{
protected $db;
public function __construct()
{
$this->db = db_connect();
}
<?php namespace App\Filters;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use CodeIgniter\Filters\FilterInterface;
class Auth implements FilterInterface
{
public function before(RequestInterface $request, $arguments = null)
{
import { reactive, toRefs } from 'vue';
const state = reactive({
error: null,
pokemons: null,
loaded: false,
loading: false,
temp: null,
});
<template>
<h1>Loops</h1>
<table border=1>
<tr v-for="hari in namaHari" v-bind:key="hari">
<td>{{ hari }}</td>
</tr>
</table>
</template>
<script>
<template>
<h1>Conditional</h1>
<h3>{{ bilangan }}</h3>
<h4 v-if="ganjil">Ganjil</h4>
<h4 v-if="genap">Genap</h4>
<button v-on:click="randomNumber">Generate</button>
</template>
<script>
export default {
<template>
<h1>Penggunaan V Model</h1>
<h4>{{ messages }}</h4>
<input v-model="messages" />
</template>
<script>
export default {
data(){
return{
<template>
<h1>Deret Bilangan Ganjil</h1>
<h4>{{ bilangan }}</h4>
<button v-on:click="next">Next</button>
</template>
<script>
export default {
data(){
return{
<template>
<h1>Hello World</h1>
<h4>Project Vue Pertama Saya</h4>
<h4>Nama Saya {{ nama }}</h4>
<h4>Umur Saya {{ umur }} tahun</h4>
</template>
<script>
export default {
data(){
<?= $this->extend('layout') ?>
<?= $this->section('head') ?>
<script src="<?= base_url('leaflet/leaflet.js') ?>"></script>
<link rel="stylesheet" href="<?= base_url('leaflet/leaflet.css') ?>" />
<style>
#maps {
height: 500px;
}
</style>