Skip to content

Instantly share code, notes, and snippets.

View aasumitro's full-sized avatar
🌏

A. A. Sumitro aasumitro

🌏
View GitHub Profile
@aasumitro
aasumitro / routes.php
Created February 5, 2018 09:21
app routes.php slim 3
<?php
/*
|----------------------------------------------------
| Routing sytem |
|----------------------------------------------------
*/
/**
* Route version without controller (example)
@aasumitro
aasumitro / mail.php
Created February 6, 2018 12:29
Lumen mail setting for Google smtp ssl
<?php
return [
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 09 Feb 2018 pada 10.51
-- Versi Server: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@aasumitro
aasumitro / settings.php
Created February 9, 2018 09:54
update settings.php
<?php
return [
'settings' => [
'displayErrorDetails' => true,
'db' => [
'driver' => 'mysql',
@aasumitro
aasumitro / dependencies.php
Created February 9, 2018 09:59
update dependencies add eloquent
<?php
/*
|----------------------------------------------------
| Container |
|----------------------------------------------------
*/
$container = $app->getContainer();
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ModelTableTest extends Model {
protected $table = 'tabel_test';
protected $fillable = [
'id',
'title',
@aasumitro
aasumitro / TestController.php
Created February 9, 2018 11:37
test controller update
<?php
namespace App\Controllers;
use App\Models\ModelTableTest as CRUD;
class TestController extends Controller {
public function index($request, $response) {
$response->getBody()->write("Hello Slim With Controller");
@aasumitro
aasumitro / routes.php
Created February 9, 2018 11:38
routes update
<?php
/*
|----------------------------------------------------
| Routing sytem |
|----------------------------------------------------
*/
/**
* Route version without controller (example)
@aasumitro
aasumitro / vscode.txt
Last active January 12, 2019 03:10
vscode setting
{
"editor.renderControlCharacters": false,
"editor.renderWhitespace": "none",
"editor.fontSize": 18,
"editor.lineHeight": 24,
"editor.wordWrap": "on",
// "editor.wrappingIndent": "same",
// "editor.wordWrapColumn": 100,
"editor.detectIndentation": false,
<?php
class CollectionModel
{
private $tipe;
private $mata_uang;
private $total_origin;
private $total_idr;
public function __construct($tipe, $mata_uang, $total_origin, $total_idr)