Viewing file: BlogSeeder.php (5.62 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; use Carbon\Carbon;
class BlogSeeder extends Seeder { public function run() { $blogs = [ [ 'title' => 'Vegan Meals That Taste Amazing', 'slug' => Str::slug('Vegan Meals That Taste Amazing'), 'image' => 'blogs/blog1.jpeg', 'description' => 'Healthy, hearty, and delicious—try these vegan meals tonight.', 'status' => 'active', ], [ 'title' => 'Secrets Behind Restaurant Lighting Design', 'slug' => Str::slug('Secrets Behind Restaurant Lighting Design'), 'image' => 'blogs/blog2.jpg', 'description' => 'Learn how lighting impacts mood and experience in dining spaces.', 'status' => 'inactive', ], [ 'title' => 'Exploring the Rise of Ghost Kitchens', 'slug' => Str::slug('Exploring the Rise of Ghost Kitchens'), 'image' => 'blogs/blog3.png', 'description' => 'How virtual restaurants are changing the food delivery game.', 'status' => 'active', ], [ 'title' => 'The Perfect Wine and Food Pairings', 'slug' => Str::slug('The Perfect Wine and Food Pairings'), 'image' => 'blogs/blog4.png', 'description' => 'Impress guests with expert wine pairing tips and tricks.', 'status' => 'active', ], [ 'title' => 'Desserts That Go Viral on Instagram', 'slug' => Str::slug('Desserts That Go Viral on Instagram'), 'image' => 'blogs/blog5.jpg', 'description' => 'These camera-ready treats are as delicious as they are photogenic.', 'status' => 'inactive', ], [ 'title' => 'Restaurant Branding 101', 'slug' => Str::slug('Restaurant Branding 101'), 'image' => 'blogs/blog6.jpg', 'description' => 'Build a strong brand identity to stand out in the food industry.', 'status' => 'active', ], [ 'title' => 'Top Food Trends for 2025', 'slug' => Str::slug('Top Food Trends for 2025'), 'image' => 'blogs/blog7.webp', 'description' => 'Stay ahead of the curve with these must-watch food trends.', 'status' => 'active', ], [ 'title' => 'How Restaurants Use Social Media Effectively', 'slug' => Str::slug('How Restaurants Use Social Media Effectively'), 'image' => 'blogs/blog8.jpg', 'description' => 'Boost your restaurant’s reach with smart content strategies.', 'status' => 'active', ], [ 'title' => 'Craft Cocktails: Tips from the Experts', 'slug' => Str::slug('Craft Cocktails: Tips from the Experts'), 'image' => 'blogs/blog9.jpg', 'description' => 'Mix drinks like a pro with these bartender-approved recipes.', 'status' => 'inactive', ], [ 'title' => 'How to Train Exceptional Restaurant Staff', 'slug' => Str::slug('How to Train Exceptional Restaurant Staff'), 'image' => 'blogs/blog10.webp', 'description' => 'Create a team that delivers excellent service every time.', 'status' => 'active', ], [ 'title' => 'The Art of Fine Dining', 'slug' => Str::slug('The Art of Fine Dining'), 'image' => 'blogs/blog11.jpg', 'description' => 'Explore the elegance and etiquette of fine dining in top restaurants.', 'status' => 'active', ], [ 'title' => '10 Best Street Foods Around the World', 'slug' => Str::slug('10 Best Street Foods Around the World'), 'image' => 'blogs/blog12.jpg', 'description' => 'From Bangkok to Mexico City, taste the best street foods ever made.', 'status' => 'active', ], [ 'title' => 'Why Farmers Markets Are a Hidden Gem', 'slug' => Str::slug('Why Farmers Markets Are a Hidden Gem'), 'image' => 'blogs/blog13.jpg', 'description' => 'Discover fresh, local produce and support small businesses.', 'status' => 'inactive', ], [ 'title' => '5-Star Dishes You Can Make at Home', 'slug' => Str::slug('5-Star Dishes You Can Make at Home'), 'image' => 'blogs/blog14.jpg', 'description' => 'Recreate gourmet restaurant meals from the comfort of your kitchen.', 'status' => 'active', ], [ 'title' => 'How to Build the Perfect Cheese Board', 'slug' => Str::slug('How to Build the Perfect Cheese Board'), 'image' => 'blogs/blog15.jpg', 'description' => 'Entertain with ease using these tips to make stunning cheese boards.', 'status' => 'inactive', ], ];
foreach ($blogs as &$blog) { $blog['created_at'] = now(); $blog['updated_at'] = now(); }
DB::table('blogs')->insert($blogs); } }
|