Skip to content

Instantly share code, notes, and snippets.

@newtonjob
newtonjob / MagicLoginLink.php
Created March 21, 2025 14:38
Magic login link using Laravel's `Password` broker
@kizzx2
kizzx2 / docker-compose.yml
Last active December 22, 2025 09:19
Restart a docker container periodically with docker-compose
version: '3'
services:
app:
image: nginx:alpine
ports: ["80:80"]
restart: unless-stopped
restarter:
image: docker:cli
volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
@calebporzio
calebporzio / PreviewOfUpcomingPackage.php
Last active December 2, 2024 12:10
A model trait that allows child models to use parent table names and relationship keys.
<?php
namespace App\Abilities;
use Illuminate\Support\Str;
use ReflectionClass;
/**
* Note: This is a preview of an upcoming package from Tighten.
**/