<?php  namespace App\Traits;  use App\Models\Like; use Illuminate\Database\Eloquent\Relations\MorphMany;  trait HasLikes { 	public function likes(): MorphMany{}  	public function hasUserLiked(): bool{}  	protected static function bootHasLikes(): void 	{ 		static::deleting(function ($model) { 			$model->likes->each(function ($item) { 				$item->delete(); 			}); 		}); 	} }