'integer', 'sold' => 'integer', 'price' => 'integer', 'views' => 'integer', 'rating' => 'integer', 'is_active' => 'boolean', 'photourl' => 'array', 'reviews' => 'array', 'specs' => 'array', ]; public function creator() { return $this->belongsTo(User::class, 'created_by'); } public function updater() { return $this->belongsTo(User::class, 'updated_by'); } public function stores() { return $this->belongsToMany(Store::class, 'prd_str') ->withPivot(['available', 'price', 'is_active']) ->withTimestamps(); } public function owner() { return $this->belongsTo(User::class, 'owner_id'); } public function createdFor() { return $this->belongsTo(User::class, 'created_for'); } }