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\Traits\Models; | |
trait GeneratesUuid | |
{ | |
/** | |
* Any model that is in the creating / bootable state will have a UUID 4 created for their primary key. | |
* | |
*/ |
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\Traits; | |
use Illuminate\Support\Arr; | |
trait AccessRules | |
{ | |
public static function getRules(array $only = []): array | |
{ |
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 | |
if (! function_exists('randomize')) { | |
/** | |
* Generates a random string used for various simple randomness. | |
* | |
* @param int $min | |
* @param int $max | |
* @param int $limit | |
* @return 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
.background-repeat-none { | |
background-repeat: no-repeat; | |
} | |
.background-size-cover { | |
background-size: cover; | |
} | |
.ease-linear { | |
transition-timing-function: linear |
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 | |
if (! function_exists('generate_slug')) { | |
/** | |
* @param array $data | |
* @param string $key | |
* @param bool $unqiue | |
* @return array | |
* @throws Exception | |
*/ |
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\Traits\Models; | |
trait CachesMediaUrl | |
{ | |
/** | |
* Caches Media urls to avoid duplicate calls |
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> | |
<input type="hidden" name="color" v-model="color"> | |
<div class="flex flex-row items-center"> | |
<div class="color-picker h-16 w-16 rounded shadow"></div> | |
<div class="ml-2 text-neutral-200"> | |
<div class="flex flex-col text-sm"> | |
<span>Color:</span> |
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 | |
/** | |
* Strips the json from a tiptap body. | |
* | |
* @param array $body | |
* @return string | |
*/ | |
function strip_json_body(array $body): string | |
{ | |
$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
<?php | |
namespace App\Drivers; | |
use Illuminate\Database\Connection; | |
use Illuminate\Support\Facades\DB; | |
use Stancl\Tenancy\Contracts\TenantDatabaseManager; | |
use Stancl\Tenancy\Contracts\TenantWithDatabase; | |
use Stancl\Tenancy\Exceptions\NoConnectionSetException; |
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\Traits; | |
trait SetupEditor | |
{ | |
public function exceedsCharacterCount($delta): bool | |
{ | |
$renderedHtml = (new \ProseMirrorToHtml\Renderer)->render($delta); |
OlderNewer