<?php

namespace App\Models;
use App\User;
use Packages\Product\Models\Product;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Category extends Model
{
    protected $guarded = [] ;

    use SoftDeletes;


    public function user()
    {
        return $this->belongsTo(User::class, 'creator_id', 'id');
    }


    public function products()
    {
        return $this->morphedByMany(Product::class, 'categorizable');
    }
}
