src/Press/Builders/TaxonomyBuilder.php
public function slug($slug = null): self
    {
        if (! empty($slug)) {
            // set this slug to be used in with callback
            $this->slug = $slug;

            // exception to filter on specific slug
            $exception = function ($query) {
                $query->where('slug', '=', $this->slug);
            };

            // load term to filter
            return $this->whereHas('term', $exception);
        }

        return $this;
    }
public function slug($slug = null): self
    {
        if (! empty($slug)) {
            // set this slug to be used in with callback
            $this->slug = $slug;

            // exception to filter on specific slug
            $exception = function ($query) {
                $query->where('slug', '=', $this->slug);
            };

            // load term to filter
            return $this->whereHas('term', $exception);
        }

        return $this;
    }
public function slug ( $ slug = null ) : self { if ( ! empty ( $ slug ) ) { // set this slug to be used in with callback $ this -> slug = $ slug ; // exception to filter on specific slug $ exception = function ( $ query ) { $ query -> where ( 'slug' , '=' , $ this -> slug ) ; } ; // load term to filter return $ this -> whereHas ( 'term' , $ exception ) ; } return $ this ; }
Get a term taxonomy by specific slug.

@param string

@return \Orchid\Press\Builders\TaxonomyBuilder
Get a term taxonomy by specific slug .