File Manager Lite
Dir:
/home/codewavebd/public_html/database/seeders
Upload
[..]
DatabaseSeeder.php (23.66 KB)
Edit
Rename
Del
Edit: DatabaseSeeder.php
<?php namespace Database\Seeders; use Illuminate\Database\Seeder; use App\Models\User; use App\Models\Category; use App\Models\Service; use App\Models\PortfolioProject; use App\Models\SoftwareProduct; use App\Models\BlogPost; use App\Models\Testimonial; use App\Models\TeamMember; use App\Models\Faq; use App\Models\Setting; use App\Models\ActivityLog; use Illuminate\Support\Facades\Hash; class DatabaseSeeder extends Seeder { public function run(): void { // 1. Create Default Admin User $admin = User::create([ 'name' => 'CodeWave Admin', 'email' => 'admin@codewave.bd', 'password' => Hash::make('Password123'), ]); ActivityLog::create([ 'user_id' => $admin->id, 'action' => 'Database successfully seeded and admin created.', 'ip_address' => '127.0.0.1', 'user_agent' => 'Seeder' ]); // 2. Categories $softwareCat1 = Category::create(['name' => 'ERP Solutions', 'slug' => 'erp-solutions', 'type' => 'software']); $softwareCat2 = Category::create(['name' => 'POS Systems', 'slug' => 'pos-systems', 'type' => 'software']); $softwareCat3 = Category::create(['name' => 'E-Commerce Engines', 'slug' => 'e-commerce-engines', 'type' => 'software']); $softwareCat4 = Category::create(['name' => 'Mobile Applications', 'slug' => 'mobile-applications', 'type' => 'software']); $portfolioCat1 = Category::create(['name' => 'Web App', 'slug' => 'web-app', 'type' => 'portfolio']); $portfolioCat2 = Category::create(['name' => 'E-Commerce', 'slug' => 'e-commerce', 'type' => 'portfolio']); $portfolioCat3 = Category::create(['name' => 'Software Integration', 'slug' => 'software-integration', 'type' => 'portfolio']); $portfolioCat4 = Category::create(['name' => 'ERP System', 'slug' => 'erp-system', 'type' => 'portfolio']); $portfolioCat5 = Category::create(['name' => 'Mobile App', 'slug' => 'mobile-app', 'type' => 'portfolio']); // 3. Services $servicesData = [ [ 'title' => 'Website Development', 'slug' => 'website-development', 'icon' => 'bi-globe', 'short_description' => 'Premium corporate portals and business websites built with high-performance responsive frameworks.', 'long_description' => 'At CodeWave BD, we design and build bespoke corporate web portals that function as digital headquarters. We prioritize lightweight architecture, smooth custom animations, search-engine optimization, and cross-browser responsiveness. Every page is tailored to project brand authority, load under one second, and drive conversions with strategic calls to action.', 'order' => 1, ], [ 'title' => 'E-commerce Development', 'slug' => 'e-commerce-development', 'icon' => 'bi-cart3', 'short_description' => 'Robust online stores equipped with advanced inventory sync, secure checkouts, and custom API gateways.', 'long_description' => 'Our custom E-commerce web engines are engineered to support massive traffic and high transactions. We avoid boilerplate themes, developing native checkout processes, custom payment gateway integrations (bKash, SSLCommerz, Nagad, Visa/Mastercard), synchronized multi-warehouse inventory systems, and granular admin dashboards to manage sales, shipping, and automated invoice emailing.', 'order' => 2, ], [ 'title' => 'Custom Software Development', 'slug' => 'custom-software-development', 'icon' => 'bi-code-slash', 'short_description' => 'Tailored desktop, web, and cloud-based utility software built to streamline complex workflow automation.', 'long_description' => 'When off-the-shelf software fails to match your operations, CodeWave BD crafts bespoke business tools from the ground up. Whether it is automated payroll, internal CRM databases, ticketing architectures, or reporting engines, we construct modular applications that fit seamlessly into your existing routines and scale gracefully with your growth.', 'order' => 3, ], [ 'title' => 'ERP Development', 'slug' => 'erp-development', 'icon' => 'bi-briefcase', 'short_description' => 'Centralized enterprise platforms connecting HR, inventory, supply chain, accounts, and operations.', 'long_description' => 'Consolidate all business channels into a single source of truth. Our Enterprise Resource Planning systems unify human resources, account registers, warehouse supply logs, production schedules, client relationship dashboards, and analytics, providing corporate leaders real-time reports to make strategic data-backed decisions.', 'order' => 4, ], [ 'title' => 'POS Development', 'slug' => 'pos-development', 'icon' => 'bi-receipt', 'short_description' => 'Blazing-fast Point of Sale applications featuring barcode registers, receipts, and offline syncing capabilities.', 'long_description' => 'Optimize retail queues with our intuitive POS engines. Built to perform flawlessly on desktop registers, laptops, and tablets, they offer instant barcode lookups, automatic discount calculations, digital receipts, offline transaction caching (synced upon reconnecting), and detailed cashier register reports.', 'order' => 5, ], [ 'title' => 'Mobile Apps', 'slug' => 'mobile-apps-development', 'icon' => 'bi-phone', 'short_description' => 'High-fidelity iOS and Android native apps that provide seamless experiences and rich integrations.', 'long_description' => 'Connect directly with clients on their mobile screens. We build highly polished cross-platform applications (Flutter, React Native) that look and feel premium. Integrations include secure push notifications, background synchronization, geographic location services, camera capture scanners, and biometrics log-in options.', 'order' => 6, ], [ 'title' => 'UI/UX Design', 'slug' => 'ui-ux-design', 'icon' => 'bi-palette', 'short_description' => 'Premium user journeys, high-fidelity mockups, wireframing, and interactive product styling.', 'long_description' => 'Design is the interface of business trust. We perform deep target demographic research to compile interactive wireframes, custom visual styles, glassmorphism layouts, clean typographic alignments, and prototype user testing directories. We ensure that final handoffs look outstanding and flow logically.', 'order' => 7, ], [ 'title' => 'SEO Services', 'slug' => 'seo-services', 'icon' => 'bi-graph-up-arrow', 'short_description' => 'Organic search visibility boost through site structure audit, keywords ranking, and rich schema markup.', 'long_description' => 'Climb to the top of Google. We implement holistic Search Engine Optimization processes, including structural audits, technical optimization (minify assets, Core Web Vitals cleanup), semantic tag hierarchies, dynamic schema LD+JSON implementations, regional keywords strategies, and clean canonical linking protocols.', 'order' => 8, ], ]; foreach ($servicesData as $serv) { Service::create($serv + [ 'status' => 'active', 'seo_title' => $serv['title'] . ' | CodeWave BD', 'seo_meta_description' => $serv['short_description'], 'seo_keywords' => strtolower($serv['title']) . ', software company, codewave, bangladesh', ]); } // 4. Software Products (Showcase) $softwareProducts = [ [ 'name' => 'WaveERP Premium', 'slug' => 'wave-erp-premium', 'category_id' => $softwareCat1->id, 'short_description' => 'Complete enterprise automation suite managing inventory, HR, accounting, and supply chain.', 'long_description' => 'WaveERP Premium is CodeWave\'s flagship enterprise automation platform designed for modern corporate organizations and manufacturing companies. It unifies operations across departments into a single secure interface. Track raw materials from purchase through warehouse queues, automatically log payroll expenses into double-entry accounting journals, and forecast next-quarter demands using native reporting analytics.', 'features' => [ 'Multi-Warehouse Inventory Control', 'Double-Entry Accounting & General Ledger', 'Automated Payroll & HR Attendance Sync', 'Supply Chain & Purchase Orders Tracking', 'Customizable Financial Reports & Balance Sheets', 'Granular User Roles & IP-restricted Access Control' ], 'screenshots' => ['erp_screen1.webp', 'erp_screen2.webp', 'erp_screen3.webp'], 'gallery' => ['erp_thumb.webp'], 'demo_video_url' => 'https://www.youtube.com/embed/dQw4w9WgXcQ', 'price' => 150000.00, 'pricing_plans' => [ ['name' => 'Standard Startup', 'price' => '৳75,000 One-time', 'desc' => 'For small companies, up to 15 users, 1 warehouse, standard reporting.'], ['name' => 'Enterprise Growth', 'price' => '৳1,50,000 One-time', 'desc' => 'For medium corporations, unlimited users, unlimited warehouses, multi-branch, priority support.'], ['name' => 'SaaS Cloud Monthly', 'price' => '৳5,000 / month', 'desc' => 'Managed hosting on secure AWS servers, auto-backups, and free software updates.'] ], ], [ 'name' => 'WavePOS Retailer', 'slug' => 'wave-pos-retailer', 'category_id' => $softwareCat2->id, 'short_description' => 'Blazing fast point-of-sale tool with barcode lookup, automatic discounting, and offline mode.', 'long_description' => 'WavePOS Retailer is a state-of-the-art billing system built to scale from local storefronts to multi-branch supermarkets. With local data-sync engine, WavePOS continues working even during internet disruptions and automatically merges invoices when connectivity returns. It features interactive hotkeys, thermal receipt configuration, and customer database logs.', 'features' => [ '0.1s Barcode Scan & Lookup', 'Offline Transaction Caching', 'Dynamic Discounts & Coupons Rules', 'Multiple Payment Gateways Support', 'Cashier Shift Reports & Register Audits', 'Supplier & Stock Reorder Alerts' ], 'screenshots' => ['pos_screen1.webp', 'pos_screen2.webp'], 'gallery' => ['pos_thumb.webp'], 'demo_video_url' => 'https://www.youtube.com/embed/dQw4w9WgXcQ', 'price' => 25000.00, 'pricing_plans' => [ ['name' => 'Single Store', 'price' => '৳25,000 One-time', 'desc' => 'For 1 terminal cashier, localized database, lifetime offline support.'], ['name' => 'Multi-Branch Sync', 'price' => '৳60,000 One-time', 'desc' => 'For unlimited outlets, unified cloud analytics, inventory transfer portal.'] ], ], [ 'name' => 'WaveShop E-Commerce Engine', 'slug' => 'waveshop-ecommerce-engine', 'category_id' => $softwareCat3->id, 'short_description' => 'Enterprise-ready headless e-commerce store with high conversion layouts and mobile responsiveness.', 'long_description' => 'WaveShop is a performance-optimized online storefront engine built for high-volume consumer retail brands. It bypasses slow page-builders, delivering static-fast page delivery, direct checkout APIs, local payment gateways, bulk spreadsheet product uploads, and automated order status notifications via SMS and email.', 'features' => [ 'SEO-Optimized Static Pages Loading', 'Direct One-Page Conversion Checkout', 'SSLCommerz & bKash Local Gateway Integration', 'SMS Gateway notifications to buyers', 'Stock allocation and discount triggers', 'Admin order fulfillment board' ], 'screenshots' => ['shop_screen1.webp', 'shop_screen2.webp'], 'gallery' => ['shop_thumb.webp'], 'demo_video_url' => 'https://www.youtube.com/embed/dQw4w9WgXcQ', 'price' => 45000.00, 'pricing_plans' => [ ['name' => 'Standard Storefront', 'price' => '৳45,000 One-time', 'desc' => 'Bootstrap 5 optimized UI, local payment setup, full source code access.'], ['name' => 'Headless Premium Pro', 'price' => '৳1,20,000 One-time', 'desc' => 'Includes separate admin manager API, Flutter companion mobile app, custom layout design.'] ], ] ]; foreach ($softwareProducts as $prod) { SoftwareProduct::create($prod + [ 'status' => 'active', 'seo_title' => $prod['name'] . ' Showcase | CodeWave BD', 'seo_meta_description' => $prod['short_description'], 'seo_keywords' => strtolower($prod['name']) . ', codewave software, erp bangladesh, pos software', ]); } // 5. Portfolio Projects $projects = [ [ 'name' => 'Apex Footwear POS Network', 'slug' => 'apex-footwear-pos-network', 'client_name' => 'Apex Footwear Dealers Group', 'category_id' => $portfolioCat3->id, 'description' => 'CodeWave BD successfully designed and integrated an offline-first POS terminal suite across 25 dealer outlets. The platform coordinates daily sales ledger uploads and ensures inventory sync with the regional warehouse database.', 'gallery' => ['apex_p1.webp', 'apex_p2.webp'], 'features' => ['Offline billing sync', 'Dual thermal printing setup', 'Agent ledger analytics'], 'live_url' => 'https://apexfootwearltd.com', 'technologies' => 'Laravel, MySQL, JavaScript, Bootstrap 5', 'image' => 'apex_thumb.webp', ], [ 'name' => 'LafargeHolcim Logistics Portal', 'slug' => 'lafargeholcim-logistics-portal', 'client_name' => 'LafargeHolcim BD Ltd.', 'category_id' => $portfolioCat4->id, 'description' => 'A custom logistics scheduler that maps concrete mixer truck dispatches, updates shipping registries, verifies client tokens, and alerts cargo captains. The enterprise system cut schedule overlaps by 32%.', 'gallery' => ['logistics_p1.webp', 'logistics_p2.webp'], 'features' => ['Real-time fleet tracker', 'Captain token validator', 'Daily log auto-backup'], 'live_url' => 'https://lafargeholcim.com.bd', 'technologies' => 'Laravel, PostgreSQL, Google Maps API, CSS3', 'image' => 'lafarge_thumb.webp', ], [ 'name' => 'Shwapno E-com Multi-Warehouse Store', 'slug' => 'shwapno-ecom-multi-warehouse-store', 'client_name' => 'Shwapno Franchise Partners', 'category_id' => $portfolioCat2->id, 'description' => 'A high-speed e-commerce solution targeting retail groceries. Built to query items from the closest franchise store based on client location coordinates. Integrates SMS updates and delivery route planning.', 'gallery' => ['grocer_p1.webp'], 'features' => ['Geolocation stock search', 'SMS payment confirmation', 'Driver routing assistant'], 'live_url' => 'https://shwapno.com', 'technologies' => 'Laravel, Vue.js APIs, MySQL, HSL CSS', 'image' => 'shwapno_thumb.webp', ] ]; foreach ($projects as $proj) { PortfolioProject::create($proj + [ 'order' => 1, 'status' => 'active', 'seo_title' => $proj['name'] . ' Case Study | CodeWave BD', 'seo_meta_description' => substr($proj['description'], 0, 150), 'seo_keywords' => 'portfolio, codewave client, case study, web development project', ]); } // 6. Testimonials $testimonials = [ [ 'client_name' => 'Rahat Chowdhury', 'client_role' => 'Head of IT Logistics', 'company_name' => 'Lafarge Concrete BD', 'review' => 'CodeWave BD delivered a logistics scheduler that changed how we track mixer fleets. The design is modern, lightning-fast, and their technical support is unmatched.', 'rating' => 5, 'image' => 't1.webp', ], [ 'client_name' => 'Ayesha Siddika', 'client_role' => 'Operations Director', 'company_name' => 'Apex Footwear Dealer Network', 'review' => 'We were searching for a POS that worked offline without constant server dropouts. WavePOS worked exactly as promised. Our store checkouts are faster than ever.', 'rating' => 5, 'image' => 't2.webp', ] ]; foreach ($testimonials as $test) { Testimonial::create($test + ['status' => 'active']); } // 7. Team Members $team = [ [ 'name' => 'Tanvir Rahman', 'role' => 'Founder & CEO', 'image' => 'team_tanvir.webp', 'bio' => 'Enterprise software strategist with 12+ years experience building business architectures.', 'socials' => ['linkedin' => 'https://linkedin.com', 'facebook' => 'https://facebook.com'], 'order' => 1, ], [ 'name' => 'Sabbir Ahmed', 'role' => 'Chief Technology Officer', 'image' => 'team_sabbir.webp', 'bio' => 'Laravel specialist, MySQL optimization wizard, and database infrastructure designer.', 'socials' => ['linkedin' => 'https://linkedin.com', 'github' => 'https://github.com'], 'order' => 2, ] ]; foreach ($team as $tm) { TeamMember::create($tm + ['status' => 'active']); } // 8. FAQs $faqs = [ [ 'question' => 'What tech stack does CodeWave BD specialize in?', 'answer' => 'We specialize in enterprise Laravel PHP, robust MySQL databases, modern Vanilla CSS/JS, and mobile app platforms like Flutter. We avoid slow website builders to deliver optimal PageSpeed.', 'type' => 'general', 'relation_id' => null, 'order' => 1, ], [ 'question' => 'How does the offline-mode in WavePOS work?', 'answer' => 'WavePOS saves active sales data locally in your browser/device database if the internet cuts out. Once your internet is restored, the system auto-merges the local log with the primary cloud server database.', 'type' => 'software', 'relation_id' => SoftwareProduct::where('slug', 'wave-pos-retailer')->first()->id ?? null, 'order' => 2, ] ]; foreach ($faqs as $faq) { Faq::create($faq + ['status' => 'active']); } // 9. Settings $settings = [ 'site_name' => 'CodeWave BD', 'site_tagline' => 'Premium Software & Digital Agency', 'contact_email' => 'contact@codewave.bd', 'contact_phone' => '+880 1712-345678', 'contact_whatsapp' => '8801712345678', 'contact_address' => 'House 42, Road 11, Banani, Dhaka, Bangladesh', 'google_analytics_code' => '<!-- Google Analytics Code Dummy -->', 'google_tag_manager_code' => '<!-- Google Tag Manager Code Dummy -->', 'google_search_console_code' => '<!-- Search Console Code Dummy -->', 'seo_title' => 'CodeWave BD | Premium Custom Software, ERP & Web Solutions', 'seo_description' => 'CodeWave BD is Bangladesh\'s leading tech agency crafting premium custom software, POS registries, enterprise ERP suites, and high-performance business web applications.', 'seo_keywords' => 'codewave bd, custom software, erp bangladesh, website development dhaka, pos software bangladesh', 'facebook_url' => 'https://facebook.com/codewavebd', 'linkedin_url' => 'https://linkedin.com/company/codewavebd', 'github_url' => 'https://github.com/codewavebd', ]; foreach ($settings as $key => $val) { Setting::set($key, $val); } // 10. Blog Posts $blogs = [ [ 'title' => 'Why Monolith Laravel beats Serverless Microservices for SMEs', 'slug' => 'why-monolith-laravel-beats-serverless', 'short_description' => 'Explore the operational, hosting, and development speed reasons why modern Laravel monolith remains the best architecture choice for scaling businesses.', 'content' => '<p>In the tech startup ecosystem, microservices have been praised as the ultimate architecture. However, for most Small and Medium Enterprises (SMEs) in Bangladesh, microservices introduce massive deployment friction, database syncing bugs, and expensive hosting costs.</p><h5>The Simplicity of Laravel</h5><p>Laravel provides a unified monolith structure that houses authentication, databases, background jobs, queues, routing, and blade styling under one clean code repository. It reduces hosting server needs to a single VPS instance and allows small engineering teams to ship updates in days rather than weeks.</p>', 'published_at' => now(), ], [ 'title' => 'Building Offline-First Systems for Retail stores in Bangladesh', 'slug' => 'building-offline-first-systems-retail-stores', 'short_description' => 'A technical walkthrough on using LocalStorage and database caching to keep cashier terminals active during power grids or fiber network drops.', 'content' => '<p>Internet reliability varies across retail hubs. If your POS registry requires an active connection for every item scan, cash queues stall, resulting in frustrated clients. Designing systems that utilize background syncing ensures seamless retail sales flow.</p>', 'published_at' => now(), ] ]; foreach ($blogs as $b) { BlogPost::create($b + [ 'status' => 'published', 'author_name' => 'Sabbir Ahmed', 'seo_title' => $b['title'] . ' | CodeWave Blog', 'seo_meta_description' => $b['short_description'], 'seo_keywords' => 'laravel monolith, web development tech, offline first systems', ]); } } }
Simpan