Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
const debounce = (fn = () => {}, wait = 1000) => (...args) => { | |
const delayed = () => fn.apply(this, args) | |
return setTimeout(delayed, wait) | |
} |
<?php | |
/* | |
* Mysql database class - only one connection alowed | |
*/ | |
class Database { | |
private $_connection; | |
private static $_instance; //The single instance | |
private $_host = "HOSTt"; | |
private $_username = "USERNAME"; | |
private $_password = "PASSWORd"; |
server { | |
listen 80; | |
#listen [::]:80; | |
server_name dev.hio.com; | |
root /Users/jimit/Code/rl_projects/hio/api/public; | |
access_log /Users/jimit/Code/rl_projects/hio/api/storage/local/nginx.access.log; | |
error_log /Users/jimit/Code/rl_projects/hio/api/storage/local/nginx.error.log; | |
location / { | |
alias /Users/jimit/Code/rl_projects/hio/front/dist/; | |
try_files $uri $uri/ /index.html?$args; |
<?php | |
$dsn = 'mysql:host=localhost;dbname=information_schema'; | |
$username = 'root'; | |
$password = 'password'; | |
$dbh = new PDO($dsn, $username, $password); | |
$tableSchema = 'db_name'; | |
$fkColumnName = 'emp_id'; | |
$pkColumnName = 'admin_id'; | |
$pkTableName = 'admin_login'; |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Laravel PHP Framework</title> | |
<style> | |
</style> | |
<script src="https://cdn.socket.io/socket.io-1.2.1.js"></script> |
################################## | |
# WORDPRESS NGINX CONFIGURATIONS | |
################################## | |
# /etc/nginx/wordpress.conf | |
# | |
# Contains a common configuration for use by nginx on a WordPress | |
# installation. This file should be included in any WordPress site | |
# nginx virtual host config located in sites-available with the following line: | |
# | |
# include /etc/nginx/wordpress.config; |
This a dirty solution, but worked for me. | |
Sacrifice my 404 page, but fix the main problem. | |
server { | |
listen 0.0.0.0:12345; | |
location / { | |
root /home/zdwolfe/src/angularAWS/app; | |
try_files $uri $uri/ /index.html =404; | |
} |
<?php | |
require_once __DIR__ . '/config/facebook.php'; | |
require_once __DIR__ . '/vendor/autoload.php'; | |
require_once __DIR__ . '/lib/utility.class.php'; | |
use Facebook\Facebook; | |
use Facebook\Exceptions\FacebookResponseException; | |
use Facebook\Exceptions\FacebookSDKException; | |
use FacebookAds\Object\AdUser; | |
use FacebookAds\Api; |
SidebarEnhancements | |
AdvancedNewFile | |
Alignment | |
DocBlockr | |
Emmet |