Skip to content

Instantly share code, notes, and snippets.

View wichaksono's full-sized avatar
🤔
Coding Is Fun.. Right ?

Wakhid Wichaksono wichaksono

🤔
Coding Is Fun.. Right ?
View GitHub Profile
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique()->nullable();
$table->string('password')->nullable();
$table->string('avatar')->nullable();
$table->rememberToken();
$table->timestamps();
});
<?php
namespace App;
use App\Models\SocialAccount;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
<div class="form-group">
<div class="col-md-12">
<center>
<a href="{{ URL('social-media/register/facebook') }}" class="btn btn-info">
Facebook
</a>
<a href="{{ URL('social-media/register/github') }}" class="btn btn-default">
Github
</a>
<a href="{{ URL('social-media/register/google') }}" class="btn btn-danger">
GITHUB_KEY=689e0acd6291d228d9
GITHUB_SECRET=0d5130692bed5b9c0fde870fce30fa8e50283e
GITHUB_CALLBACK_URL=http://localhost:8000/social-media/registered/github
GOOGLE_KEY=1067955128684-css1sofpblgl8us9sddq98btdckbbr.apps.googleusercontent.com
GOOGLE_SECRET=NHTgS98vMj6LCH5BQQz0b7
GOOGLE_CALLBACK_URL=http://localhost:8000/social-media/registered/google
FACEBOOK_KEY=2428111161776
FACEBOOK_SECRET=518eb96c7e8a68f53ecbdc7a8d87d2
'github' => [
'client_id' => env('GITHUB_KEY'),
'client_secret' => env('GITHUB_SECRET'),
'redirect' => env('GITHUB_CALLBACK_URL'),
],
'google' => [
'client_id' => env('GOOGLE_KEY'),
'client_secret' => env('GOOGLE_SECRET'),
'redirect' => env('GOOGLE_CALLBACK_URL'),
'providers' => [
// di provider
Laravel\Socialite\SocialiteServiceProvider::class,
],
'aliases' => [
// alias
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
],
<?php
if ( $a == '' ) { // jika $a kosong
echo 'nilai a tidak boleh kosong';
} else if($b == '' ) { // if kedua akan dijalankan ketika if pertama menyatakan bahwa $a memiliki nilai. disini kita akan mengechek nilai b, berisi / tidak
echo 'nilai b tidak boleh kosong';
} else if ( $a &gt; $b ) {
echo 'benar';
<?php
$a = 5;
$b = 10;
# if contoh 1
if ( $a > $b ) {
echo 'benar';
} else {
echo 'salah';
}
@wichaksono
wichaksono / installer.sh
Created February 9, 2018 10:22 — forked from pentagonal/installer.sh
Ubuntu MySQL + Php (7.1) + Nginx (+Redis) Automated Installer
#!/bin/bash
#
# Pentagonal
# Ubuntu (Based) Php, Nginx, MariaDB Installer
# youtube: https://www.youtube.com/pentagonalOrg
# email: [email protected]
#
isDefaultOk=false;
body {
/*text-align: center;*/
}
.vote-container {
width: 600px;
margin:0 auto;
text-align: center;
}
.vote-container table {
width: 100%;