src/Observers/SlugObserver.php
private function slugExists(Model $model, $locale)
    {
        $query = $model::where('slug->'.$locale, $model->getTranslation('slug', $locale));
        if ($model->id) {
            $query->where('id', '!=', $model->id);
        }

        return (bool) $query->count();
    }
private function slugExists(Model $model, $locale)
    {
        $query = $model::where('slug->'.$locale, $model->getTranslation('slug', $locale));
        if ($model->id) {
            $query->where('id', '!=', $model->id);
        }

        return (bool) $query->count();
    }
private function slugExists ( Model $ model , $ locale ) { $ query = $ model :: where ( 'slug->' . $ locale , $ model -> getTranslation ( 'slug' , $ locale ) ) ; if ( $ model -> id ) { $ query -> where ( 'id' , '!=' , $ model -> id ) ; } return ( bool ) $ query -> count ( ) ; }
Search for item with same slug.

@param mixed $model

@return bool
Search for item with same slug .