انتقل إلى المحتوى
الأدلة
التنقل
التنبيهات
الطبقات العائمة
التخطيط
عرض البيانات
النماذج
.md

الأسعار

pricing-17

جدول مقارنة ميزات بلا حدود مع رؤوس خطط في المنتصف وصفوف مجمّعة وأزرار مكررة وتبويبات شهري / سنوي.

فتح بملء الشاشة

التثبيت

php artisan ui:add-block pricing-17

أمر واحد يثبّت ملف Blade الخاص بالقالب وكل مكوّن يعتمد عليه. اعرضه في تخطيطك كالتالي <x-ui.blocks.pricing-17 />.

المكونات المضمّنة

الاستخدام

Every piece of content is a prop, so you can drive this section from a CMS. Each plan carries a monthly price (price + period) and a yearly one (yearlyPrice + yearlyPeriod); the Monthly / Yearly tabs swap between them. A comparison row is ['label' => ..., 'values' => [...]] with one value per plan, in plan order: true draws a check, false or null leaves the cell empty, and a string ('10', 'Unlimited') is printed as-is. The plan buttons repeat under the table.

<x-ui.blocks.pricing-17
    tagline="Pricing"
    heading="Compare plans"
    description="Every plan includes SSL and daily backups."
    :plans="[
        ['name' => 'Starter', 'price' => '$9', 'period' => '/mo', 'yearlyPrice' => '$90', 'yearlyPeriod' => '/yr', 'description' => 'For side projects', 'buttonLabel' => 'Start free', 'buttonHref' => '/register'],
        ['name' => 'Team', 'price' => '$29', 'period' => '/mo', 'yearlyPrice' => '$290', 'yearlyPeriod' => '/yr', 'description' => 'For growing teams', 'buttonLabel' => 'Choose Team', 'buttonHref' => '/register?plan=team'],
    ]"
    :categories="[
        ['title' => 'Usage', 'features' => [
            ['label' => 'Projects', 'values' => ['3', 'Unlimited']],
            ['label' => 'Custom domains', 'values' => [false, true]],
        ]],
    ]"
/>

الخصائص

كل خاصية مع قيمتها الافتراضية. مرّر أيًّا منها كسمة، واستخدم : لربط قيمة PHP.

@props([
    'tagline' => 'Tagline',
    'heading' => 'Pricing plan',
    'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
    'monthlyLabel' => 'Monthly',
    'yearlyLabel' => 'Yearly',
    'includedLabel' => 'Included',
    'notIncludedLabel' => 'Not included',
    'plans' => [
        [
            'name' => 'Basic',
            'price' => '$19',
            'period' => '/mo',
            'yearlyPrice' => '$199',
            'yearlyPeriod' => '/yr',
            'description' => 'Lorem ipsum dolor sit amet',
            'buttonLabel' => 'Get started',
            'buttonHref' => null,
        ],
        [
            'name' => 'Business',
            'price' => '$29',
            'period' => '/mo',
            'yearlyPrice' => '$299',
            'yearlyPeriod' => '/yr',
            'description' => 'Lorem ipsum dolor sit amet',
            'buttonLabel' => 'Get started',
            'buttonHref' => null,
        ],
        [
            'name' => 'Enterprise',
            'price' => '$49',
            'period' => '/mo',
            'yearlyPrice' => '$499',
            'yearlyPeriod' => '/yr',
            'description' => 'Lorem ipsum dolor sit amet',
            'buttonLabel' => 'Get started',
            'buttonHref' => null,
        ],
    ],
    'categories' => array_fill(0, 3, [
        'title' => 'Feature Category',
        'features' => [
            ['label' => 'Feature text goes here', 'values' => ['10', '25', 'Unlimited']],
            ['label' => 'Feature text goes here', 'values' => [true, true, true]],
            ['label' => 'Feature text goes here', 'values' => [true, true, true]],
            ['label' => 'Feature text goes here', 'values' => [false, true, true]],
            ['label' => 'Feature text goes here', 'values' => [false, false, true]],
        ],
    ]),
])