public function getParentAttribute() { return $this->belongsTo('App\\Category', 'category_id')->first(); }