public function scopeSearch($query, $search)
    {
        return $query->whereName($search)
                     ->orWhere('id', intval($search))
                     ->orWhere('slug', intval($search));
    }