Sotka

TestSite

← Örnek listeye dön

Rehber · 20.08.2026 · 3 dk

Listeyi çekmek: strapi.find

Bir koleksiyonun tüm kayıtlarını tek satırda alın.

Listeyi çekmek: strapi.find

Liste sayfası için tek ihtiyacınız olan strapi.find:

const articles = await strapi.find("sample-articles", {
    populate: ["cover", "category"],
    sort: ["publishedAt:desc"],
});

Dönen kayıtlar düzdür: article.title, article.cover.url.

const article = await strapi.findFirst("sample-articles", {
    filters: { slug: params.slug },
    populate: ["cover", "category", "seo"],
});
if (!article) notFound();

Aynı kategoriden