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
<?php | |
use Aws\Ses\SesClient; | |
use Aws\Exception\AwsException; | |
/** | |
* Send an email using the 'raw' version of the API. | |
* Use this when needing to send an attachment. | |
* | |
* @param array $addresses |
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
<?php | |
use Exception; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\Facades\Log; | |
final class CsvService { | |
/** | |
* CSV data from file into an array using the provided mappings, then insert to database. | |
* |
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
<template> | |
<div class="modal" id="confirmModal" tabindex="-1" aria-labelledby="confirmModalLabel" aria-hidden="true"> | |
<div class="modal-dialog modal-dialogue-centered"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<h5 class="modal-title" id="confirmModalLabel"><slot name="modal-header"></slot></h5> | |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
<span aria-hidden="true">×</span> | |
</button> | |
</div> |
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
<?php | |
namespace App\Exceptions; | |
use Illuminate\Auth\AuthenticationException; | |
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | |
use Symfony\Component\ErrorHandler\Exception\FlattenException; | |
use Throwable; | |
class Handler extends ExceptionHandler |
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
<style> | |
#overlay { | |
background: #000; | |
color: #fff; | |
position: fixed; | |
height: 100%; | |
width: 100%; | |
z-index: 5000; | |
top: 0; | |
left: 0; |
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
<?php | |
/** | |
* Match pattern PT#H#M#S (leading PT, hours, minutes, seconds) and return seconds value. | |
* | |
* @param string $string | |
* @return int | |
*/ | |
private static function convertDuration($string) | |
{ | |
// Comprehensive regex that should match any 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
<?php | |
/** | |
* Checks if string is valid JSON. | |
* | |
* @param string $string | |
* @return bool | |
*/ | |
public function jsonCheck($string) | |
{ |
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 class="loading hidden"><i class="fa fa-spin fa-circle-o-notch" style="font-size: 48px;"></i></div> | |
<script type="text/javascript"> | |
const formData = new FormData(); | |
formData.append('key', 'value'); | |
$.ajax({ | |
async: true, | |
contentType: false, | |
processData: false, |
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
const endpoint = 'https://api.some.endpoint.test'; | |
const formId = 'this-form-id-value'; | |
const data = new FormData(document.getElementById('formId')); | |
$.ajax({ | |
async: true, | |
contentType: false, | |
processData: false, | |
url: endpoint, | |
method: 'POST', |
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
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Cache TTL | |
|-------------------------------------------------------------------------- | |
| | |
| Set commonly used TTL values. | |
| | |
*/ | |
return [ |
NewerOlder