This file contains hidden or 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 | |
function memoize($target) { | |
static $memo = new WeakMap; | |
return new class ($target, $memo) { | |
function __construct( | |
protected $target, | |
protected &$memo, | |
) {} |
This file contains hidden or 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\Support; | |
use Illuminate\Session\Store; | |
use RuntimeException; | |
/** | |
* Helper class that transforms all sessions into a specific key. | |
* |
This file contains hidden or 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
# Add to your .env.example and .env files | |
CSP_ENABLED=true | |
CSP_REPORT_ONLY=true |
This file contains hidden or 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 {{ factoryNamespace }}; | |
use Illuminate\Database\Eloquent\Factories\Factory; | |
use {{ namespacedModel }}; | |
/** | |
* @method {{ model }}|\Illuminate\Support\Collection<{{ model }}> create($attributes = [], ?Model $parent = null) | |
* @method \Illuminate\Support\Collection<{{ model }}> createMany(iterable $records) |
This file contains hidden or 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 _ = require('lodash') | |
module.exports = function ({addUtilities, e, theme, variants}) { | |
const gradients = theme('gradients', {}) | |
const gradientsVariants = variants('gradients', []) | |
const utilities = _.map(gradients, ([start, end, direction], name) => ({ | |
[`.bg-gradient-${e(name)}`]: { | |
backgroundImage: `linear-gradient(${direction}, ${start}, ${end})` | |
} |
This file contains hidden or 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 _ = require('lodash') | |
module.exports = function ({addBase, addUtilities, e, theme, variants}) { | |
const gridGaps = theme('gridGap', {}) | |
const gridTemplates = theme('gridTemplate', {}) | |
const gridGapVariants = variants('gridGap', []) | |
const gridTemplateVariants = variants('gridTemplate', []) | |
const gapUtilities = _.map(gridGaps, (size, name) => ({ | |
[`.grid-gap-${e(name)}`]: {gridGap: `${size}`}, |
This file contains hidden or 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
// ****************************** | |
// https://mineral-ui.com/color | |
// ****************************** | |
module.exports = { | |
colors: { | |
transparent: 'transparent', | |
black: '#1d1f24', | |
white: '#ffffff', |
This file contains hidden or 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 PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'array_indentation' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => [ | |
'default' => 'single_space', |
This file contains hidden or 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
(function (window, document) { | |
'use strict'; | |
let className = 'tabbing'; | |
let handleFirstTab = function (e) { | |
if (e.keyCode === 9) { | |
document.body.classList.add(className); | |
window.removeEventListener('keydown', handleFirstTab); | |
window.addEventListener('mousedown', handleMouseDownOnce); |
This file contains hidden or 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\Jobs; | |
use App\Product; | |
use Illuminate\Bus\Queueable; | |
use Illuminate\Support\Facades\Redis; | |
use Illuminate\Queue\SerializesModels; | |
use Illuminate\Queue\InteractsWithQueue; | |
use Illuminate\Contracts\Queue\ShouldQueue; |
NewerOlder