<?php  namespace App\Traits;  use App\Models\OrderItem; use Illuminate\Http\Resources\Json\JsonResource; use Illuminate\Database\Eloquent\Relations\MorphMany;  trait IsBillable { 	// add eager load morphs to all models that implement IsBillable - in OrderItem class  	abstract public function getSingleBillableResource(): JsonResource;  	abstract public function getItemEditRoute(): string;  	abstract public function getItemName(string $lang = 'en'): string;  	public function getPrice(): float{}  	public function getPriceWithTax(): float{}  	public function getQuantity(): int{}  	public function getBillableItemType(): string{}  	public function getListBillableResource(): JsonResource{}  	public function orderItems(): MorphMany{}  	protected static function bootIsBillable(): void 	{ 		static::deleting(function ($model) { 			$model->orderItems()->update([ 				'item_id' => null, 				'item_type' => null, 			]); 		}); 	} }