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
<div | |
x-data="{ value: @entangle($attributes->wire('model')), picker: undefined }" | |
x-init="new Pikaday({ field: $refs.input, format: 'MM/DD/YYYY', onOpen() { this.setDate($refs.input.value) } })" | |
x-on:change="value = $event.target.value" | |
> | |
<input | |
{{ $attributes->whereDoesntStartWith('wire:model')->merge(['class' => 'border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm']) }} | |
x-ref="input" | |
type="text" | |
x-bind:value="value" |
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
# This function retreives varaibles from your .env file (must be in same directory as this script) | |
read_var() { | |
VAR=$(grep $1 .env | xargs) | |
IFS="=" read -ra VAR <<<"$VAR" | |
echo ${VAR[1]} | |
} | |
######### SET YOUR VARIABLES ######### | |
##-------------------## |
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
Artisan::command('logs:clear', function () { | |
exec('rm ' . storage_path('logs/*.log')); | |
$this->comment('Logs have been cleared!'); | |
})->describe('Clear log files'); |
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
CREATE FUNCTION `HTMLDecode`(x TEXT) RETURNS text CHARSET latin1 | |
BEGIN | |
DECLARE TextString TEXT; | |
SET TextString = x; | |
SET TextString = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(TextString,"<strong>", ""),"</strong>", ""),"<p>", ""),"</p>", "\n"),"<ul>", ""),"<li>", "- "),"</li>", "\n"),"</ul>", ""),"<br />", "\n"),"<br>", "\n"),"&", "&")," ", " "),"'", "'"),"<", "<"),">", ">"),"–", "-"),"•", "- "),"’", "'"),"…", "..."),"·", "- "),"”", "'"),"“", "'"),"‘", "'"),"#", "#"),"½", "1/2"),"°", "°"),"<i>", ""),"</i>", ""),""",'"'),"'",'"') | |
RETURN TextString; |
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
public function check_date($str) | |
{ | |
$dts = date_create_from_format("Y-m-d", $str); | |
if ($dts == FALSE) | |
{ | |
$this->form_validation->set_message('check_date', 'The {field} field is in an unreadable format'); | |
return false; | |
} | |
$maxDate = date_create_from_format('Y-m-d', date('Y-m-d', strtotime('+1 day'))); | |
if ($dts > $maxDate) |