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

الأسعار

pricing-11

عنوان في المنتصف وتبويبات شهري / سنوي فوق بطاقتي خطة: الاسم والسعر والزر ثم قائمة الميزات.

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

التثبيت

php artisan ui:add-block pricing-11

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

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

الاستخدام

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.

<x-ui.blocks.pricing-11
    tagline="Pricing"
    heading="Pick a plan"
    description="Cancel any time."
    monthly-label="Monthly"
    yearly-label="Yearly"
    :plans="[
        [
            'name' => 'Starter',
            'description' => 'For side projects',
            'price' => '$9',
            'period' => '/mo',
            'yearlyPrice' => '$90',
            'yearlyPeriod' => '/yr',
            'buttonLabel' => 'Start free',
            'buttonHref' => '/register',
            'features' => ['3 projects', 'Email support'],
        ],
    ]"
/>

الخصائص

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

@props([
    'tagline' => 'Tagline',
    'heading' => 'Pricing plan',
    'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
    'monthlyLabel' => 'Monthly',
    'yearlyLabel' => 'Yearly',
    'plans' => [
        [
            'name' => 'Basic plan',
            'description' => 'Lorem ipsum dolor sit amet',
            'price' => '$19',
            'period' => '/mo',
            'yearlyPrice' => '$199',
            'yearlyPeriod' => '/yr',
            'buttonLabel' => 'Get started',
            'buttonHref' => null,
            'features' => array_fill(0, 3, 'Feature text goes here'),
        ],
        [
            'name' => 'Business plan',
            'description' => 'Lorem ipsum dolor sit amet',
            'price' => '$29',
            'period' => '/mo',
            'yearlyPrice' => '$299',
            'yearlyPeriod' => '/yr',
            'buttonLabel' => 'Get started',
            'buttonHref' => null,
            'features' => array_fill(0, 5, 'Feature text goes here'),
        ],
    ],
])