57 lines
3.6 KiB
PHP
57 lines
3.6 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Modules\Faq\Models\Faq;
|
|
use Modules\Products\Models\Product;
|
|
use Modules\Team\Models\TeamMember;
|
|
use Modules\Testimonials\Models\Testimonial;
|
|
|
|
final class SaaslandDemoSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
if (Schema::hasTable('products')) {
|
|
foreach ([
|
|
['name' => 'Starter', 'price' => 19, 'description' => 'For individuals and small teams getting started.', 'features' => ['5 team members', 'Core analytics', 'Email support'], 'cta_label' => 'Start free', 'cta_url' => '/register', 'sort_order' => 10],
|
|
['name' => 'Growth', 'price' => 49, 'description' => 'For growing businesses that need more control.', 'features' => ['25 team members', 'Advanced analytics', 'Automations', 'Priority support'], 'cta_label' => 'Choose Growth', 'cta_url' => '/register', 'is_featured' => true, 'sort_order' => 20],
|
|
['name' => 'Scale', 'price' => null, 'description' => 'For established organisations with complex needs.', 'features' => ['Unlimited members', 'Custom integrations', 'Dedicated success manager'], 'cta_label' => 'Contact sales', 'cta_url' => '#contact', 'sort_order' => 30],
|
|
] as $plan) {
|
|
Product::query()->updateOrCreate(
|
|
['name' => $plan['name'], 'product_type' => 'plan'],
|
|
$plan + ['product_type' => 'plan', 'currency' => 'GBP', 'billing_period' => 'month', 'is_active' => true]
|
|
);
|
|
}
|
|
}
|
|
|
|
if (Schema::hasTable('testimonials')) {
|
|
foreach ([
|
|
['name' => 'Alex Morgan', 'company' => 'Northstar', 'content' => 'The platform gave us one clear view of the business and cut reporting time dramatically.', 'rating' => 5],
|
|
['name' => 'Priya Shah', 'company' => 'Lumina', 'content' => 'Our onboarding is faster, our handoffs are cleaner, and the team finally works from the same data.', 'rating' => 5],
|
|
['name' => 'Daniel Reed', 'company' => 'Orbit', 'content' => 'We launched in days and had enough insight to improve conversion in the first month.', 'rating' => 5],
|
|
] as $item) {
|
|
Testimonial::query()->updateOrCreate(['name' => $item['name'], 'company' => $item['company']], $item + ['enabled' => true]);
|
|
}
|
|
}
|
|
|
|
if (Schema::hasTable('faqs')) {
|
|
foreach ([
|
|
['question' => 'Can I change plan later?', 'answer' => 'Yes. Plans can be upgraded or changed whenever your requirements evolve.', 'sort_order' => 10],
|
|
['question' => 'Is my data secure?', 'answer' => 'The platform uses role-based access controls, secure sessions, audit logging, and production-ready deployment guidance.', 'sort_order' => 20],
|
|
['question' => 'Can the frontend be customised?', 'answer' => 'Yes. Theme settings control branding, content sections, navigation, colours, and public-site presentation.', 'sort_order' => 30],
|
|
] as $item) {
|
|
Faq::query()->updateOrCreate(['question' => $item['question']], $item + ['category' => 'General', 'enabled' => true]);
|
|
}
|
|
}
|
|
|
|
if (Schema::hasTable('team_members')) {
|
|
TeamMember::query()->updateOrCreate(
|
|
['name' => 'Product Team'],
|
|
['job_title' => 'Platform specialists', 'biography' => 'A multidisciplinary team focused on reliable, secure, and elegant digital experiences.', 'email' => null, 'sort_order' => 10, 'enabled' => true]
|
|
);
|
|
}
|
|
}
|
|
}
|