Skip to content

Instantly share code, notes, and snippets.

View robbinbenard's full-sized avatar
🎮
Office Simulator

Robbin Benard robbinbenard

🎮
Office Simulator
View GitHub Profile
@robbinbenard
robbinbenard / choices.blade.php
Created December 4, 2024 16:47
Livewire + Choices.js
@props([
'placeholder' => null,
])
<div
wire:ignore
x-data="{
value: $wire.entangle(@js($attributes->wire('model')->value)){{ $attributes->wire('model')->hasModifier('live') ? '.live' : '' }},
init () {
@robbinbenard
robbinbenard / Throttle.php
Created October 26, 2023 13:53 — forked from stevebauman/Throttle.php
Laravel Throttle Validation Rule
<?php
namespace App\Rules;
use Illuminate\Http\Request;
use Illuminate\Cache\RateLimiter;
use Illuminate\Contracts\Validation\Rule;
class Throttle implements Rule
{
<?php
namespace App\Providers;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Support\ServiceProvider;
use Illuminate\Database\Eloquent\Builder;
class QueryBuilderServiceProvider extends ServiceProvider
{
/*
// Place your snippets for PHP here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
<?php
class Mach3frameworkValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri