App\Models\Store\Product::scopeLatest PHP Méthode

scopeLatest() public méthode

public scopeLatest ( $query )
    public function scopeLatest($query)
    {
        return $query->where('master_product_id', null)->where('enabled', true)->with('masterProduct')->with('variations')->orderBy('promoted', 'desc')->orderBy('display_order', 'desc');
    }