<?php  namespace App\Traits;  use App\Models\GiftCode; use Illuminate\Database\Eloquent\Relations\MorphOne;  trait HasGiftCode { 	public function giftCode(): MorphOne{}  	protected static function bootHasGiftCode(): void 	{ 		static::deleting(function ($model): void { 			if ($model->giftCode()->exists()) { 				$model->giftCode->each(function ($item): void { 					$item->delete(); 				}); 			} 		}); 	} }