public function scopeRecentlyEdited(Builder $query, $limit = null)
    {
        $query->orderBy('updated_at', 'desc');

        if ($limit)
        {
            $query->limit($limit);
        }

        return $query;
    }
public function scopeRecentlyEdited(Builder $query, $limit = null)
    {
        $query->orderBy('updated_at', 'desc');

        if ($limit)
        {
            $query->limit($limit);
        }

        return $query;
    }
public function scopeRecentlyEdited ( Builder $ query , $ limit = null ) { $ query -> orderBy ( 'updated_at' , 'desc' ) ; if ( $ limit ) { $ query -> limit ( $ limit ) ; } return $ query ; }
Recently edited scope

@param Builder $query
@param int|null $limit
@return Builder
Recently edited scope