Google PageSpeed Insights flags browser caching of Google Analytics:
Leverage browser caching
Set up a proxy in your Nginx configuration file to address this issue.
<?php | |
use PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'array_indentation' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => [ | |
'default' => 'single_space', |
function asset_path($filename) { | |
$manifest_path = '../dist/rev-manifest.json'; | |
if (file_exists($manifest_path)) { | |
$manifest = json_decode(file_get_contents($manifest_path), TRUE); | |
} else { | |
$manifest = []; | |
} | |
if (array_key_exists($filename, $manifest)) { |
All Autocomplete | |
AutoFileName | |
Blade Snippets | |
BracketHighlighter | |
ColorPicker | |
DocPHPManualer | |
Emmet | |
jQuery | |
Laravel 5 Artisan | |
Laravel Blade Highlighter |
<?php | |
/** | |
* Accordion ShortCode. | |
* | |
* @param array $accordion_attrs Accordion ShortCode attribute. | |
* | |
* @return string | |
*/ | |
function accordion_register_shortcode( $accordion_attrs ) { |
#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
#!/bin/sh | |
echo "Start Auto Deployment" | |
git --work-tree=//computer-name/deployment --git-dir=//computer-name/myrepo checkout -f | |
echo "Deployment Finished" |
private function findNearestLocation(Request $request) | |
{ | |
$location = DB::table('locations') | |
->select('name', 'latitude', 'longitude', 'region', DB::raw(sprintf( | |
'(6371 * acos(cos(radians(%1$.7f)) * cos(radians(latitude)) * cos(radians(longitude) - radians(%2$.7f)) + sin(radians(%1$.7f)) * sin(radians(latitude)))) AS distance', | |
$request->input('latitude'), | |
$request->input('longitude') | |
))) | |
->having('distance', '<', 50) | |
->orderBy('distance', 'asc') |