Useful for preventing PII from being tracked.
Usage:
- In GA4 config tag set
page_location
={{Page URL (PII Stripped)}}. - In UA's GA Settings, set
page
={{UA Pageview URL (PII Stripped)}} andlocation
={{Page URL (PII Stripped)}}.
<?php | |
use Illuminate\Database\Query\Builder; | |
Builder::macro('orderByNulls', function ($column, $direction = 'asc', $nulls = 'last', $bindings = []) { | |
$column = $this->getGrammar()->wrap($column); | |
$direction = strtolower($direction) === 'asc' ? 'asc' : 'desc'; | |
$nulls = strtolower($nulls) === 'first' ? 'NULLS FIRST' : 'NULLS LAST'; | |
return $this->orderByRaw("$column $direction $nulls", $bindings); | |
}); |
Useful for preventing PII from being tracked.
Usage:
page_location
={{Page URL (PII Stripped)}}.page
={{UA Pageview URL (PII Stripped)}} and location
={{Page URL (PII Stripped)}}./** | |
* Mass (bulk) insert or update on duplicate for Laravel 4/5 | |
* | |
* insertOrUpdate([ | |
* ['id'=>1,'value'=>10], | |
* ['id'=>2,'value'=>60] | |
* ]); | |
* | |
* | |
* @param array $rows |
// Returns an array of dates between the two dates | |
function getDates (startDate, endDate) { | |
const dates = [] | |
let currentDate = startDate | |
const addDays = function (days) { | |
const date = new Date(this.valueOf()) | |
date.setDate(date.getDate() + days) | |
return date | |
} | |
while (currentDate <= endDate) { |