This file contains hidden or 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 | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Role extends Model | |
{ | |
public $timestamps = false; | |
protected $fillable = [ |
This file contains hidden or 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 | |
require 'config.php'; | |
$sql = "SELECT * FROM statistik ORDER BY date_create DESC"; | |
$query = $db->query($sql); | |
?> | |
<h3>Daftar User yang pernah mengakses Halaman</h3> | |
<table border="1"> | |
<tr> |
This file contains hidden or 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 | |
/** | |
* @return IP (192.168.1.1) | |
*/ | |
function ip_user() | |
{ | |
if (! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { | |
$ip = $_SERVER['HTTP_CLIENT_IP']; | |
} elseif (! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { |
This file contains hidden or 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 | |
/** | |
* Informasi akun untuk akses database | |
* @var $dbhost host database biasanya diisi 'localhost' atau '127.0.0.1' | |
* @var $dbuser username database, untuk xampp biasanya diisi "root" | |
* @var $dbpass password database, untuk xampp biasanya dikosongkan | |
* @var $dbname nama database yang akan diakses | |
*/ | |
$dbhost = 'localhost'; | |
$dbuser = 'root'; |
This file contains hidden or 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 | |
// Menyisipkan file Koneksi ke database | |
// File ini diperlukan saat berinteraksi dengan database Seperti INSERT, UPDATE, DELETE dan SELECT | |
require 'config.php'; | |
// Menyisipkan file functions.php agar function yang kita buat dapat dipakai dihalaman ini | |
require 'functions.php'; | |
/** | |
* Test |
This file contains hidden or 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
Route::group(['prefix' => 'social-media', 'namespace' => 'Auth'], function(){ | |
Route::get('register/{provider}', 'SocialiteController@register'); | |
Route::get('registered/{provider}', 'SocialiteController@registered'); | |
}); |