Файловый менеджер - Редактировать - /home/clickysoft/public_html/calvary-p2.clickysoft.net/database/seeders/InNOutSeeder.php
Назад
<?php namespace Database\Seeders; use App\Models\VendorItem; use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; class InNOutSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { // IN n Out Vendor ID: 4 //CHOICE (A) Items $choiceA = [ //ELEMENTARY SCHOOL OPTIONS [ 'id' => 124, 'vendor_id' => 4, 'name' => "Grilled Cheese, Plain", 'description' => null, 'price' => 36.75, 'status' => 1, 'image' => 'menu-images/elementary-school-options/Grilled Cheese, Plain - $36.75.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 125, 'vendor_id' => 4, 'name' => "Grilled Cheese, Lettuce, & Tomato", 'description' => null, 'price' => 36.75, 'status' => 1, 'image' => 'menu-images/elementary-school-options/Grilled Cheese, Lettuce, & Tomato - $36.75.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 126, 'vendor_id' => 4, 'name' => "Hamburger, Plain", 'description' => null, 'price' => 37.50, 'status' => 1, 'image' => 'menu-images/elementary-school-options/Hamburger, Plain - $37.50.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 127, 'vendor_id' => 4, 'name' => "Hamburger, Lettuce, & Tomato", 'description' => null, 'price' => 37.50, 'status' => 1, 'image' => 'menu-images/elementary-school-options/Hamburger, Lettuce, & Tomato - $37.50.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 128, 'vendor_id' => 4, 'name' => "Cheeseburger, Plain", 'description' => null, 'price' => 39.50, 'status' => 1, 'image' => 'menu-images/elementary-school-options/Cheeseburger, Plain - $39.50.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 129, 'vendor_id' => 4, 'name' => "Cheeseburger, Lettuce, & Tomato", 'description' => null, 'price' => 39.50, 'status' => 1, 'image' => 'menu-images/elementary-school-options/Cheeseburger, Lettuce, & Tomato - $39.50.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], //MIDDLE SCHOOL ONLY OPTIONS [ 'id' => 130, 'vendor_id' => 4, 'name' => "Grilled Cheese, Plain", 'description' => null, 'price' => 44.60, 'status' => 1, 'image' => 'menu-images/middle-school-options/Grilled Cheese, Plain - $44.60.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 131, 'vendor_id' => 4, 'name' => "Grilled Cheese, Lettuce, & Tomato", 'description' => null, 'price' => 44.60, 'status' => 1, 'image' => 'menu-images/middle-school-options/Grilled Cheese, Lettuce, & Tomato - $44.60.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 132, 'vendor_id' => 4, 'name' => "Hamburger, Plain", 'description' => null, 'price' => 45.00, 'status' => 1, 'image' => 'menu-images/middle-school-options/Hamburger, Plain - $45.00.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 133, 'vendor_id' => 4, 'name' => "Hamburger, Lettuce, & Tomato", 'description' => null, 'price' => 45.00, 'status' => 1, 'image' => 'menu-images/middle-school-options/Hamburger, Lettuce, & Tomato - $45.00.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 134, 'vendor_id' => 4, 'name' => "Cheeseburger, Plain", 'description' => null, 'price' => 47.25, 'status' => 1, 'image' => 'menu-images/middle-school-options/Cheeseburger, Plain - $47.25.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 135, 'vendor_id' => 4, 'name' => "Cheeseburger, Lettuce, & Tomato", 'description' => null, 'price' => 47.25, 'status' => 1, 'image' => 'menu-images/middle-school-options/Cheeseburger, Lettuce, & Tomato - $47.25.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 136, 'vendor_id' => 4, 'name' => "Double Double, Meat Only (No Cheese)", 'description' => null, 'price' => 50.00, 'status' => 1, 'image' => 'menu-images/middle-school-options/Double Double, Meat Only (No Cheese) - $50.00.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 137, 'vendor_id' => 4, 'name' => "Double Double, Meat, Lettuce, & Tomato (No Cheese)", 'description' => null, 'price' => 50.00, 'status' => 1, 'image' => 'menu-images/middle-school-options/Double Double, Meat, Lettuce, & Tomato (No Cheese) - $50.00.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 138, 'vendor_id' => 4, 'name' => "Double Double Cheeseburger, Plain", 'description' => null, 'price' => 54.25, 'status' => 1, 'image' => 'menu-images/middle-school-options/Double Double Cheeseburger, Plain - $54.25.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 139, 'vendor_id' => 4, 'name' => "Double Double Cheeseburger, Lettuce, & Tomato", 'description' => null, 'price' => 54.25, 'status' => 1, 'image' => 'menu-images/middle-school-options/Double Double Cheeseburger, Lettuce, & Tomato - $54.25.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], //MIDDLE SCHOOL ONLY OPTIONS WITH PROTEIN [ 'id' => 140, 'vendor_id' => 4, 'name' => "Grilled Cheese, Plain (Protein Style)", 'description' => null, 'price' => 44.60, 'status' => 1, 'image' => 'menu-images/middle-school-options/Grilled Cheese, Plain - $44.60.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 141, 'vendor_id' => 4, 'name' => "Grilled Cheese, Lettuce, & Tomato (Protein Style)", 'description' => null, 'price' => 44.60, 'status' => 1, 'image' => 'menu-images/middle-school-options/Grilled Cheese, Lettuce, & Tomato - $44.60.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 142, 'vendor_id' => 4, 'name' => "Hamburger, Plain (Protein Style)", 'description' => null, 'price' => 45.00, 'status' => 1, 'image' => 'menu-images/middle-school-options/Hamburger, Plain - $45.00.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 143, 'vendor_id' => 4, 'name' => "Hamburger, Lettuce, & Tomato (Protein Style)", 'description' => null, 'price' => 45.00, 'status' => 1, 'image' => 'menu-images/middle-school-options/Hamburger, Lettuce, & Tomato - $45.00.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 144, 'vendor_id' => 4, 'name' => "Cheeseburger, Plain (Protein Style)", 'description' => null, 'price' => 47.25, 'status' => 1, 'image' => 'menu-images/middle-school-options/Cheeseburger, Plain - $47.25.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 145, 'vendor_id' => 4, 'name' => "Cheeseburger, Lettuce, & Tomato (Protein Style)", 'description' => null, 'price' => 47.25, 'status' => 1, 'image' => 'menu-images/middle-school-options/Cheeseburger, Lettuce, & Tomato - $47.25.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 146, 'vendor_id' => 4, 'name' => "Double Double, Meat Only (No Cheese) (Protein Style)", 'description' => null, 'price' => 50.00, 'status' => 1, 'image' => 'menu-images/middle-school-options/Double Double, Meat Only (No Cheese) - $50.00.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 147, 'vendor_id' => 4, 'name' => "Double Double, Meat, Lettuce, & Tomato (No Cheese) (Protein Style)", 'description' => null, 'price' => 50.00, 'status' => 1, 'image' => 'menu-images/middle-school-options/Double Double, Meat, Lettuce, & Tomato (No Cheese) - $50.00.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 148, 'vendor_id' => 4, 'name' => "Double Double Cheeseburger, Plain (Protein Style)", 'description' => null, 'price' => 54.25, 'status' => 1, 'image' => 'menu-images/middle-school-options/Double Double Cheeseburger, Plain - $54.25.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 149, 'vendor_id' => 4, 'name' => "Double Double Cheeseburger, Lettuce, & Tomato (Protein Style)", 'description' => null, 'price' => 54.25, 'status' => 1, 'image' => 'menu-images/middle-school-options/Double Double Cheeseburger, Lettuce, & Tomato - $54.25.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], //PRE SCHOOL ONLY OPTIONS [ 'id' => 150, 'vendor_id' => 4, 'name' => "Grilled Cheese, Plain", 'description' => null, 'price' => 83.00, 'status' => 1, 'image' => 'menu-images/elementary-school-options/Grilled Cheese, Plain - $36.75.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 151, 'vendor_id' => 4, 'name' => "Grilled Cheese, Lettuce, & Tomato", 'description' => null, 'price' => 83.00, 'status' => 1, 'image' => 'menu-images/elementary-school-options/Grilled Cheese, Lettuce, & Tomato - $36.75.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 152, 'vendor_id' => 4, 'name' => "Hamburger, Plain", 'description' => null, 'price' => 84.25, 'status' => 1, 'image' => 'menu-images/elementary-school-options/Hamburger, Plain - $37.50.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 153, 'vendor_id' => 4, 'name' => "Hamburger, Lettuce, & Tomato", 'description' => null, 'price' => 84.25, 'status' => 1, 'image' => 'menu-images/elementary-school-options/Hamburger, Lettuce, & Tomato - $37.50.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 154, 'vendor_id' => 4, 'name' => "Cheeseburger, Plain", 'description' => null, 'price' => 88.75, 'status' => 1, 'image' => 'menu-images/elementary-school-options/Cheeseburger, Plain - $39.50.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], [ 'id' => 155, 'vendor_id' => 4, 'name' => "Cheeseburger, Lettuce, & Tomato", 'description' => null, 'price' => 88.75, 'status' => 1, 'image' => 'menu-images/elementary-school-options/Cheeseburger, Lettuce, & Tomato - $39.50.jpg', 'created_at' => new \DateTime(), 'updated_at' => new \DateTime(), ], ]; foreach ($choiceA as $choice){ $image = public_path("assets/{$choice['image']}"); $item = VendorItem::create([ 'id' => $choice['id'], 'vendor_id' => $choice['vendor_id'], 'name' => $choice['name'], 'description' => $choice['description'], 'price' => $choice['price'], 'status' => $choice['status'], 'created_at' => $choice['created_at'], 'updated_at' => $choice['updated_at'], ]); if (is_file($image)){ $item->addMedia($image) ->preservingOriginal() ->toMediaCollection('images', 'items'); } } } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка