public function findByAttributes($componentId = null)
    {
        return $this->model->with('component', 'priority', 'user', 'brand')->whereHas('component', function($q) use($componentId) {
                    $q->where('active', 1);
                    if (!is_null($componentId)) {
                        $q->where('id', $componentId);
                    }
                })->where('brand_id', brand_id())->orderBy('created_at', 'desc');
    }