Skip to content

Instantly share code, notes, and snippets.

View gwleuverink's full-sized avatar

Willem Leuverink gwleuverink

View GitHub Profile
@gwleuverink
gwleuverink / progress-bar.blade.php
Last active August 25, 2023 07:10
Progress bar blade component
View progress-bar.blade.php
@props([
'percentage' => 0,
'failed' => false
])
@php
$done = $failed || $percentage == 100;
@endphp
<div {{ $attributes->merge(['class' => ' space-y-1'])->whereDoesntStartWith('wire:poll') }}
@gwleuverink
gwleuverink / EmailValidation.php
Last active February 3, 2021 09:11
Experiment loading livewire component from gist
View EmailValidation.php
public $email;
public function updated($name)
{
$this->validateOnly($name, [
'email' => 'required|email',
]);
}
@gwleuverink
gwleuverink / webpack.mix.js
Created November 9, 2018 08:55
Laravel mix vendor.js + bundles setup
View webpack.mix.js
const mix = require('laravel-mix');
const fs = require('fs')
const resourcePath = 'resources/js/'
const assetPath = 'public/assets/'
/*
|--------------------------------------------------------------------------
| Helper functions
|--------------------------------------------------------------------------