Skip to content

Instantly share code, notes, and snippets.

View herusdianto's full-sized avatar

Heru Rusdianto herusdianto

  • Bandung, West Java, Indonesia
View GitHub Profile
@herusdianto
herusdianto / IdDiffFormatter.php
Last active March 20, 2021 16:16
Laravel Carbon Difference For Humans Bahasa Indonesia
<?php namespace Acme\DiffFormatters;
// app/Acme/DiffFormatters/IdDiffFormatter.php
use Laravelrus\LocalizedCarbon\DiffFormatters\DiffFormatterInterface;
use Lang;
class IdDiffFormatter implements DiffFormatterInterface {
/**
@herusdianto
herusdianto / Alamat.php
Last active August 29, 2015 14:07
Laravel Eloquent Relationship: One To One
<?php
// app/models/Alamat.php
class Alamat extends Eloquent {
/**
* The database table used by the model.
*
* @var string
@herusdianto
herusdianto / Alamat.php
Created October 2, 2014 08:57
Laravel Eloquent Relationship: Belongs To
<?php
// app/models/Alamat.php
class Alamat extends Eloquent {
/**
* The database table used by the model.
*
* @var string
@herusdianto
herusdianto / DatabaseSeeder.php
Created October 2, 2014 09:57
Laravel Eloquent Relationship: One To Many
<?php
// app/database/seeds/DatabaseSeeder.php
class DatabaseSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
@herusdianto
herusdianto / Preferences.sublime-settings
Last active August 29, 2015 14:07
My Sublime Text 3 Setting
{
"auto_complete_delay": 0,
"caret_style": "phase",
"color_scheme": "Packages/User/Monokai (SL).tmTheme",
"default_line_ending": "unix",
"font_face": "Ubuntu Mono",
"font_size": 14,
"highlight_line": true,
"highlight_modified_tabs": true,
"indent_to_bracket": true,
@herusdianto
herusdianto / RemindersController.php
Created November 1, 2014 03:07
Laravel email password reminder dengan subject
<?php
// app/controllers/RemindersController.php
/**
* Class RemindersController
*/
class RemindersController extends SiteController {
/**
@herusdianto
herusdianto / DatabaseSeeder.php
Last active August 29, 2015 14:08
Laravel Eloquent Relationship: Many To Many
<?php
// app/database/seeds/DatabaseSeeder.php
/**
* Class DatabaseSeeder
*/
class DatabaseSeeder extends Seeder {
/**
@herusdianto
herusdianto / DatabaseSeeder.php
Created November 8, 2014 08:21
Laravel Eloquent Relationship: Has Many Through
<?php
// app/database/seeds/DatabaseSeeder.php
/**
* Class DatabaseSeeder
*/
class DatabaseSeeder extends Seeder {
/**
@herusdianto
herusdianto / Aktivitas.php
Created November 8, 2014 09:23
Laravel Eloquent Relationship: Polymorphic Relations
<?php
// app/models/Aktivitas.php
/**
* Class Aktivitas
*/
class Aktivitas extends Eloquent {
/**
@herusdianto
herusdianto / Aktivitas.php
Created November 9, 2014 07:14
Laravel Eloquent Relationship: Many To Many Polymorphic Relations
<?php
// app/models/Aktivitas.php
/**
* Class Aktivitas
*/
class Aktivitas extends Eloquent {
/**