Customized authentication will be used in this gist instead of default Auth facade provided by Laravel
composer create-project laravel-laravel your-project-name
cd your-project-name
sudo apt-get install libnss3-tools jq xsel
sudo apt-get install php
php*-cli php*-common php*-curl php*-json php*-mbstring php*-mcrypt php*-mysql php*-opcache php*-readline php*-xml php*-zip
php*-sqlite3 php*-mysql php*-pgsql
<?php | |
/** | |
* Validates a given latitude $lat | |
* | |
* @param float|int|string $lat Latitude | |
* @return bool `true` if $lat is valid, `false` if not | |
*/ | |
function validateLatitude($lat) { | |
return preg_match('/^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$/', $lat); |