This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- .... --> | |
<!-- UTM params --> | |
<input type="hidden" name="utm_source" value="{{ session('utm_source') }}"> | |
<input type="hidden" name="utm_medium" value="{{ session('utm_medium') }}"> | |
<input type="hidden" name="utm_campaign" value="{{ session('utm_campaign') }}"> | |
<input type="hidden" name="utm_term" value="{{ session('utm_term') }}"> | |
<input type="hidden" name="utm_content" value="{{ session('utm_content') }}"> | |
<!-- Other handy inputs for marketing ROIs --> | |
<input type="hidden" name="url" value="{{request()->url()}}"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace App\Http\Controllers; | |
// .... | |
public static function sanitizeAndPrepareForRegexSearch($searchQuery) | |
{ | |
// General input sanitization | |
$sanitized = trim(filter_var($searchQuery, FILTER_SANITIZE_STRING)); | |
// Reserved chars for regex operator | |
$excludedChars = config('app.excluded_chars'); // ['(', ')', '[', ']', '#', '@', '?', '!', '_', '-', '/', '\\', '^', '~'] |
OlderNewer