Skip to content

Instantly share code, notes, and snippets.

View ansezz's full-sized avatar
馃殌

Anass Ez-zouaine ansezz

馃殌
View GitHub Profile
@ns139426
ns139426 / DuplicateResource.php
Last active March 5, 2025 14:53
Duplicate Resource Action for Laravel Nova
<?php
namespace App\Nova\Actions;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Collection;
use Laravel\Nova\Actions\Action;
use Laravel\Nova\Fields\ActionFields;
@thomaslombart
thomaslombart / Switch.vue
Created August 24, 2020 16:03
An example of a toggle switch with Vue 3
<template>
<label class="container">
<input
v-bind="$attrs"
class="input"
type="checkbox"
:checked="checked"
@change="$emit('update:checked', $event.target.checked)"
/>
<span class="switch"></span>