Skip to content

Instantly share code, notes, and snippets.

View azzazkhan's full-sized avatar
😄
Enjoying myself

Azzaz azzazkhan

😄
Enjoying myself
View GitHub Profile
@azzazkhan
azzazkhan / Book.php
Last active November 27, 2023 17:45
Self-healing URL trait inspired by Aaron Francis
<?php
namespace App\Models\Content;
use App\Concerns\{HasLikes, HasSelfHealingUrls, HasUlid, Reportable, Searchable};
use App\Traits\Book\{HasRelations, HasScopes, HasAttributes};
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Carbon;