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 | |
| declare(strict_types=1); | |
| namespace App\Rules; | |
| use Closure; | |
| use DOMException; | |
| use Dom\HTMLDocument; | |
| use Illuminate\Contracts\Validation\ValidationRule; |
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
| import { useMemo } from 'react'; | |
| export type UsePluckKeys<T, K extends keyof T> = T[K][]; | |
| export type UsePluckKeyValues<T, K extends keyof T, V extends keyof T> = Record<T[K] & PropertyKey, T[V]>; | |
| export type UsePluck<T, K extends keyof T, V extends keyof T> = UsePluckKeys<T, K> | UsePluckKeyValues<T, K, V>; | |
| export function usePluck<T, K extends keyof T>(options: T[], key: K): UsePluckKeys<T, K>; |
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\Models\Post; | |
| use App\Models\Like; | |
| use App\Models\User; | |
| use App\Notifications\AggregatedLikeNotification; | |
| use App\Notifications\SingleLikeNotification; | |
| use Illuminate\Contracts\Queue\ShouldQueue; |
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
| window.Alpine.directive('placeholder', (el, context, framework) => { | |
| if (el.tagName !== 'INPUT' && el.tagName !== 'TEXTAREA') { | |
| throw new Error('The `x-placeholder` directive can only be used on an `input` or `textarea` element.'); | |
| } | |
| const placeholder = el.getAttribute('placeholder'); | |
| if (!placeholder) { | |
| return; | |
| } |
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
| { | |
| {$CADDY_GLOBAL_OPTIONS} | |
| admin {$CADDY_SERVER_ADMIN_HOST}:{$CADDY_SERVER_ADMIN_PORT} | |
| log { | |
| level {$CADDY_SERVER_LOG_LEVEL:INFO} | |
| output {$CADDY_SERVER_LOG_OUTPUT:stdout} | |
| # Redact the authorization parameters... | |
| format filter { |
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 | |
| declare(strict_types=1); | |
| function async(Closure $task): Closure | |
| { | |
| static $resolved = []; | |
| static $id = 0; |
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
| import { DependencyList, useCallback, useEffect, useRef } from 'react'; | |
| const raf = | |
| typeof window !== 'undefined' | |
| ? window.requestAnimationFrame || | |
| ((cb: FrameRequestCallback) => window.setTimeout(() => cb(Date.now()), 1_000 / 60)) | |
| : () => undefined; | |
| const caf = typeof window !== 'undefined' ? window.cancelAnimationFrame || window.clearTimeout : () => undefined; |
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
| import { hooks } from '@adonisjs/core/app' | |
| import { cp, mkdir, readFile, rm, writeFile } from 'node:fs/promises' | |
| import path from 'node:path' | |
| const PACKAGE_PREFIX = 'flowshub-' | |
| export default hooks.buildFinished(async (bundler) => { | |
| const repoRoot = path.resolve(bundler.cwdPath, '../../') | |
| const buildDir = path.join(bundler.cwdPath, 'build') |
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
| import type { HttpContext } from '@adonisjs/core/http' | |
| import app from '@adonisjs/core/services/app' | |
| import router from '@adonisjs/core/services/router' | |
| import { RuntimeException } from '@poppinss/utils/exception' | |
| const transmit = await app.container.make('transmit') | |
| transmit.authorize<{ id: string }>('users/:id', async (ctx: HttpContext, params) => { | |
| const userId = ctx.auth.user?.id |
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 | |
| declare(strict_types=1); | |
| namespace App\Concerns; | |
| use Closure; | |
| use Inertia\Inertia; | |
| use Inertia\Response; | |
| use InertiaUI\Modal\Modal; |
NewerOlder