Viewing file: RestaurantSeeder.php (6.13 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Database\Seeders;
use App\Models\Restaurant; use Illuminate\Database\Seeder; use Illuminate\Support\Str; use Illuminate\Support\Carbon;
class RestaurantSeeder extends Seeder { public function run() { $data = [ [ 'user_id' => 2, 'name' => 'Delicious Bites', 'slug' => Str::slug('Delicious Bites'), 'timing' => '10:00 AM - 10:00 PM', 'phone_number' => '+1234567890', 'template' => 'classic', 'email' => 'info@deliciousbites.com', 'currency_symbol' => '$', 'currency_code' => 'USD', 'description' => 'A cozy place offering gourmet delights.', 'has_reservation' => 'yes', 'location' => '123 Main St, Springfield', 'profile_image' => 'restaurent_profile.jpg', 'cover_image' => 'restaurent_cover.jpg', 'status' => 'active', 'order_status' => 'enable', 'footer' => '© 2025 Delicious Bites', 'photos' => json_encode(['restaurants_one.jpg', 'restaurants_two.jpg']), 'opening_hours' => json_encode([ ['opening_date' => 'Saturday', 'opening_hour' => '12:00 PM - 11:00 PM'], ['opening_date' => 'Sunday', 'opening_hour' => 'Closed'], ['opening_date' => 'Monday', 'opening_hour' => '10:00 AM - 10:00 PM'], ['opening_date' => 'Tuesday', 'opening_hour' => '10:00 AM - 10:00 PM'], ['opening_date' => 'Wednesday', 'opening_hour' => '10:00 AM - 10:00 PM'], ['opening_date' => 'Thursday', 'opening_hour' => '10:00 AM - 10:00 PM'], ['opening_date' => 'Friday', 'opening_hour' => '10:00 AM - 11:00 PM'], ]), 'others_information' => json_encode([ ['title' => 'Wi-Fi', 'details' => 'Available', 'other_image' => null], ['title' => 'Parking', 'details' => 'Free', 'other_image' => null], ['title' => 'Note', 'details' => 'Kids friendly', 'other_image' => null], ]), 'country' => 'USA', 'state' => 'Illinois', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now(), ], [ 'user_id' => 2, 'name' => 'Sweet Spoon Café', 'slug' => Str::slug('Sweet Spoon Café'), 'timing' => '8:00 AM - 8:00 PM', 'phone_number' => '+1987654321', 'template' => 'modern', 'email' => 'hello@sweetspoon.com', 'currency_symbol' => '$', 'currency_code' => 'USD', 'description' => 'A delightful café known for pastries and coffee.', 'has_reservation' => 'yes', 'location' => '456 Elm St, Springfield', 'profile_image' => 'sweetspoon_profile.jpg', 'cover_image' => 'sweetspoon_cover.jpg', 'status' => 'active', 'order_status' => 'enable', 'footer' => '© 2025 Sweet Spoon Café', 'photos' => json_encode(['cafe1.jpg', 'cafe2.jpg']), 'opening_hours' => json_encode([ ['opening_date' => 'Everyday', 'opening_hour' => '8:00 AM - 8:00 PM'], ]), 'others_information' => json_encode([ ['title' => 'Wi-Fi', 'details' => 'Available', 'other_image' => null], ['title' => 'Note', 'details' => 'Vegan options available', 'other_image' => null], ]), 'country' => 'USA', 'state' => 'Illinois', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now(), ], [ 'user_id' => 3, 'name' => 'The Urban Griddle', 'slug' => Str::slug('The Urban Griddle'), 'timing' => '9:00 AM - 9:00 PM', 'phone_number' => '+1122334455', 'template' => 'modern', 'email' => 'contact@urbangriddle.com', 'currency_symbol' => '$', 'currency_code' => 'USD', 'description' => 'Trendy diner serving brunch, burgers, and more.', 'has_reservation' => 'no', 'location' => '789 Oak St, Springfield', 'profile_image' => 'griddle_profile.jpg', 'cover_image' => 'griddle_cover.jpg', 'status' => 'active', 'order_status' => 'enable', 'footer' => '© 2025 The Urban Griddle', 'photos' => json_encode(['urban1.jpg', 'urban2.jpg']), 'opening_hours' => json_encode([ ['opening_date' => 'Monday to Friday', 'opening_hour' => '9:00 AM - 9:00 PM'], ['opening_date' => 'Saturday', 'opening_hour' => '8:00 AM - 11:00 PM'], ['opening_date' => 'Sunday', 'opening_hour' => 'Closed'], ]), 'others_information' => json_encode([ ['title' => 'Wi-Fi', 'details' => 'No', 'other_image' => null], ['title' => 'Pet Friendly', 'details' => 'Yes', 'other_image' => null], ]), 'country' => 'USA', 'state' => 'Illinois', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now(), ], ];
Restaurant::insert($data); }
}
|