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';
<?php | |
$countries = array | |
( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', |
<form action="" enctype="multipart/form-data" method="post"> | |
<input id="file" name="file" type="file" /> | |
<input id="Submit" name="submit" type="submit" value="Submit" /> | |
</form> |
var BatchStream = require('batch-stream2') | |
var gulp = require('gulp') | |
var coffee = require('gulp-coffee') | |
var uglify = require('gulp-uglify') | |
var cssmin = require('gulp-minify-css') | |
var bower = require('gulp-bower-files') | |
var stylus = require('gulp-stylus') | |
var livereload = require('gulp-livereload') | |
var include = require('gulp-include') | |
var concat = require('gulp-concat') |
#!/bin/bash | |
confirm() { | |
echo "Press RETURN to continue, or ^C to cancel."; | |
read -e ignored | |
} | |
GIT='git' | |
LTS="Ubuntu 10.04" |
<?php | |
// include required files form Facebook SDK | |
require_once( 'Facebook/HttpClients/FacebookHttpable.php' ); | |
require_once( 'Facebook/HttpClients/FacebookCurl.php' ); | |
require_once( 'Facebook/HttpClients/FacebookCurlHttpClient.php' ); | |
require_once( 'Facebook/Entities/AccessToken.php' ); | |
require_once( 'Facebook/Entities/SignedRequest.php' ); |
import {Injectable, provide} from 'angular2/core'; | |
import {Observable} from 'rxjs'; | |
const GEOLOCATION_ERRORS = { | |
'errors.location.unsupportedBrowser': 'Browser does not support location services', | |
'errors.location.permissionDenied': 'You have rejected access to your location', | |
'errors.location.positionUnavailable': 'Unable to determine your location', | |
'errors.location.timeout': 'Service timeout has been reached' | |
}; |
#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.
Run the following commands in sequence.
sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
This example shows how to convert from a Mapbox-gl map projection to a d3.geo Mercator projection. This allows you to take full advantage of all the d3.geo based functions and examples while also leveraging the power and ease-of-use of mapbox-gl
Much credit goes to @vicapow who developed viewport-mercator-project where he figured out the necessary calculations to make this work.
Built with blockbuilder.org
In the case that you don't want development errors making their way to Sentry for error tracking, you can use the code below to ensure that Sentry will only record exceptions when in production.
First, instead of loading the SentryLaravelServiceProvider
in the config/app.php
providers
array, we will load it in our App/Providers/AppServiceProvider.php
. This allows us to check the environment before loading the appropriate service providers.
Seconly, in our App/Exceptions/Handler.php
we again check for the production
environment before trying to capture the exception using Sentry. This second step prevents Sentry from trying to catch an exception when it isn't bound in the container.