protected function getSlugSourceString()
    {
        // if callback given
        if (is_callable($this->slugOptions->generateSlugFrom)) {
            $slug = call_user_func($this->slugOptions->generateSlugFrom, $this);

            return substr($slug, 0, $this->slugOptions->maximumLength);
        }

        // concatenate on the fields and implode on seperator
        $slug = collect($this->slugOptions->generateSlugFrom)->map(function ($fieldName = '') {
            return $this->$fieldName;
        })->implode($this->slugOptions->slugSeparator);

        return substr($slug, 0, $this->slugOptions->maximumLength);
    }
protected function getSlugSourceString()
    {
        // if callback given
        if (is_callable($this->slugOptions->generateSlugFrom)) {
            $slug = call_user_func($this->slugOptions->generateSlugFrom, $this);

            return substr($slug, 0, $this->slugOptions->maximumLength);
        }

        // concatenate on the fields and implode on seperator
        $slug = collect($this->slugOptions->generateSlugFrom)->map(function ($fieldName = '') {
            return $this->$fieldName;
        })->implode($this->slugOptions->slugSeparator);

        return substr($slug, 0, $this->slugOptions->maximumLength);
    }
protected function getSlugSourceString ( ) { // if callback given if ( is_callable ( $ this -> slugOptions -> generateSlugFrom ) ) { $ slug = call_user_func ( $ this -> slugOptions -> generateSlugFrom , $ this ) ; return substr ( $ slug , 0 , $ this -> slugOptions -> maximumLength ) ; } // concatenate on the fields and implode on seperator $ slug = collect ( $ this -> slugOptions -> generateSlugFrom ) -> map ( function ( $ fieldName = '' ) { return $ this -> $ fieldName ; } ) -> implode ( $ this -> slugOptions -> slugSeparator ) ; return substr ( $ slug , 0 , $ this -> slugOptions -> maximumLength ) ; }
Get the string that should be used as base for the slug.
Get the string that should be used as base for the slug .