Skip to content

Instantly share code, notes, and snippets.

View Z3d0X's full-sized avatar

ZedoX Z3d0X

View GitHub Profile
@Z3d0X
Z3d0X / CopyToClipboardAction.php
Created October 19, 2023 08:02
Filament CopyToClipboardAction
<?php
namespace App\Filament\Pages\Actions;
use Closure;
use Filament\Pages\Actions\Action as BaseAction;
use Illuminate\Support\HtmlString;
class CopyToClipboardAction extends BaseAction
{
@Z3d0X
Z3d0X / Builder-Unique.php
Last active September 18, 2023 08:23
Repeater / Builder Unique
<?php
//Use on a field inside a builder
->rule(function (
Component $component,
mixed $state,
) {
return function (string $attribute, $value, Closure $fail) use ($component, $state) {
/** @var array<string,array<string,mixed>> */
@Z3d0X
Z3d0X / FilamentQuickStart.php
Created April 8, 2022 19:34
Quickly install and configure filament in a new laravel project
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
class FilamentQuickStart extends Command
{
protected $signature = 'filament:quickstart';
@Z3d0X
Z3d0X / store.js
Last active June 2, 2021 09:44
Easy Local/Session Storage for JSON (w/ lodash)
import { get as lget, set as lset, unset } from "lodash";
export default function appStore(
init = null,
driver = "session",
appkey = "app"
) {
//set(appkey,init)
if (init) {
let store = {};