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
<script> Sfdump = window.Sfdump || (function (doc) { doc.documentElement.classList.add('sf-js-enabled'); var rxEsc = /([.*+?^${}()|\[\]\/\\])/g, idRx = /\bsf-dump-\d+-ref[012]\w+\b/, keyHint = 0 <= navigator.platform.toUpperCase().indexOf('MAC') ? 'Cmd' : 'Ctrl', addEventListener = function (e, n, cb) { e.addEventListener(n, cb, false); }; if (!doc.addEventListener) { addEventListener = function (element, eventName, callback) { element.attachEvent('on' + eventName, function (e) { e.preventDefault = function () {e.returnValue = false;}; e.target = e.srcElement; callback(e); }); }; } function toggle(a, recursive) { var s = a.nextSibling || {}, oldClass = s.className, arrow, newClass; if (/\bsf-dump-compact\b/.test(oldClass)) { arrow = '▼'; newClass = 'sf-dump-expanded'; } else if (/\bsf-dump-expanded\b/.test(oldClass)) { arrow = '▶'; newClass = 'sf-dump-compact'; } else { return false; } if (doc.createEvent && s.dispatchEvent) { var event = doc.createEvent('Event'); event.initEvent('sf-dump-expanded |
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 | |
Schema::create('media', function (Blueprint $table) { | |
$table->id(); | |
$table->string('native_title')->index(); | |
// ... | |
$table->timestamp('published_at'); | |
$table->timestamps(); | |
}); |
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 | |
/** | |
* @template T | |
* @param T $target | |
* @return T | |
*/ | |
function memoize($target) { | |
static $memo = new \WeakMap(); |
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
import { createApp, h } from 'vue' | |
import { createInertiaApp, router } from '@inertiajs/vue3' | |
// This virtual import adds the HMR code to the client | |
import 'virtual:inertia/reload' | |
// This persists the router to `window`, can't think of another way unfortunately | |
window.inertia = { router } | |
// Alternatively you could just have the "client code" here, but the packagability would be worse | |
createInertiaApp({ |
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 Illuminate\Routing\Route; | |
use Illuminate\Routing\Router; | |
test('basic feature test', function () { | |
$routes = collect(app(Router::class)->getRoutes()->getRoutes()) | |
->filter(fn (Route $route) => ! isVendorRoute($route)); | |
foreach ($routes as $route) { |
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
{ | |
"description": "The settings in this file are persisted server-side. This file is generated automatically. Editing it is not recommended. Modify SettingsToPersist.json to specify which settings are persisted.", | |
"files": [ | |
{ | |
"name": "Game.cfg", | |
"sections": [ | |
{ | |
"name": "Accessibility", | |
"settings": [ | |
{ |
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
<script setup lang="ts"> | |
import { useNotifications } from '~/ts/notifications/notifications' | |
const { notifications, dismiss } = useNotifications() | |
</script> | |
<template> | |
<div aria-live="assertive" class="flex fixed inset-0 z-40 items-end py-6 px-4 pointer-events-none sm:items-start sm:p-6"> | |
<div class="flex flex-col items-center space-y-4 w-full sm:items-end"> | |
<TransitionGroup |
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\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\File; | |
use Tightenco\Ziggy\Ziggy; | |
class GenerateRoutesCommand extends Command | |
{ |
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
import type { Plugin } from 'vite' | |
const PLUGIN_NAME = 'vite:inertia:layout' | |
const TEMPLATE_LAYOUT_REGEX = /<template +layout(?: *= *['"](?:(?:(\w+):)?(\w+))['"] *)?>/ | |
export default (): Plugin => ({ | |
name: PLUGIN_NAME, | |
transform: (code: string) => { | |
if (!TEMPLATE_LAYOUT_REGEX.test(code)) { | |
return |
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
import { VisitOptions } from '../router' | |
import { useForm as useSlimeForm, UseFormBuilder, UseFormRule } from 'slimeform' | |
import { reactive, readonly, ref, UnwrapNestedRefs } from 'vue' | |
import { router } from '../router' | |
type SubmitFunctionParameters = Omit<VisitOptions, 'data'> | |
interface FormOptions<FormT extends {}> extends Omit<VisitOptions, 'data'> { | |
timeout?: number | |
/** Target URL. */ |
NewerOlder