Skip to content

Instantly share code, notes, and snippets.

View robertdrakedennis's full-sized avatar

Robert Dennis robertdrakedennis

View GitHub Profile
@robertdrakedennis
robertdrakedennis / _utilities.scss
Created October 22, 2019 13:09
Simple utilities for animation + misc helpers
.background-repeat-none {
background-repeat: no-repeat;
}
.background-size-cover {
background-size: cover;
}
.ease-linear {
transition-timing-function: linear
@robertdrakedennis
robertdrakedennis / GeneratesRandomness.php
Last active October 27, 2019 05:01
Helper for generating a truly random string
<?php
if (! function_exists('randomize')) {
/**
* Generates a random string used for various simple randomness.
*
* @param int $min
* @param int $max
* @param int $limit
* @return string
@robertdrakedennis
robertdrakedennis / AccessesRules.php
Last active August 1, 2021 15:48
AccessesRules Trait, used for form requests
<?php
namespace App\Traits;
use Illuminate\Support\Arr;
trait AccessRules
{
public static function getRules(array $only = []): array
{
@robertdrakedennis
robertdrakedennis / GeneratesUuid.php
Last active November 6, 2019 22:08
Simple Laravel UUID4 Generation on bootable models.
<?php
namespace App\Traits\Models;
trait GeneratesUuid
{
/**
* Any model that is in the creating / bootable state will have a UUID 4 created for their primary key.
*
*/