src/Models/Base.php
public function scopePublished(Builder $query)
    {
        $field = 'status';
        if (in_array($field, (array) $this->translatable)) {
            $field .= '->'.config('app.locale');
        }

        return $query->where($field, '1');
    }
public function scopePublished(Builder $query)
    {
        $field = 'status';
        if (in_array($field, (array) $this->translatable)) {
            $field .= '->'.config('app.locale');
        }

        return $query->where($field, '1');
    }
public function scopePublished ( Builder $ query ) { $ field = 'status' ; if ( in_array ( $ field , ( array ) $ this -> translatable ) ) { $ field .= '->' . config ( 'app.locale' ) ; } return $ query -> where ( $ field , '1' ) ; }
Get published models.

@param Builder $query

@return Builder $query
Get published models .