<?php

namespace Modules\Main\Traits;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\Relations\MorphOne;
use Modules\Main\Models\CityAppend;
use Modules\Main\Models\City;
use Modules\User\Models\User;

trait CityAppendTrait
{
    public function cities(): MorphMany
    {
        return $this->MorphMany(CityAppend::class, 'append');
    }

    public function byCity()
    {
        //return $query->where('category', $category);
        $user = null;
        settype($user, User::class);
        $user = auth()->user();
        return true;
    }
}


