// SYSTEM PANEL //
[ROOT]
/
mnt
/
pleskStorage
/
vhosts
/
kodsolutions.net
/
subdomains
/
go-rent.kodsolutions.net
/
database
/
seeders
[ PARENT ]
EDIT :: CarCategoriesSeeder.php
<?php namespace Database\Seeders; use App\Models\Car\Car; use App\Models\Car\Category; use App\Models\City; use App\Models\Office\Office; use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; use Throwable; class CarCategoriesSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { // php artisan db:seed --class=CarCategoriesSeeder $mercedes = Category::create([ 'title' => ['ar' => 'مرسيدس', 'en' => 'Mercedes','ur' => 'Mercedes'], 'position' => 1, 'active' => 1, 'image' => 'car.png', 'icon' => 'car.png', 'slug' => 'mercedes', 'type' => '0', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $bmw = Category::create([ 'title' => ['ar' => 'بي ام دبليو', 'en' => 'BMW','ur' => 'BMW'], 'position' => 1, 'active' => 1, 'image' => 'car.png', 'icon' => 'car.png', 'slug' => 'bmw', 'type' => '0', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $audi = Category::create([ 'title' => ['ar' => 'أودي', 'en' => 'Audi','ur' => 'Audi'], 'position' => 1, 'active' => 1, 'image' => 'car.png', 'icon' => 'car.png', 'slug' => 'audi', 'type' => '0', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $c180 = Category::create([ 'title' => ['ar' => 'c180', 'en' => 'c180','ur' => 'c180'], 'position' => 1, 'active' => 1, 'image' => 'car.png', 'icon' => 'car.png', 'slug' => 'c180', 'type' => '1', // Car or Types(brand-model...) 'category_id' => $mercedes->id, 'in_home' => 1 ]); $a3 = Category::create([ 'title' => ['ar' => 'A3', 'en' => 'A3','ur' => 'A3'], 'position' => 1, 'active' => 1, 'image' => 'car.png', 'icon' => 'car.png', 'slug' => 'a3', 'type' => '1', // Car or Types(brand-model...) 'category_id' => $audi->id, 'in_home' => 1 ]); $a320i = Category::create([ 'title' => ['ar' => '320i', 'en' => '320i','ur' => '320i'], 'position' => 1, 'active' => 1, 'image' => 'car.png', 'icon' => 'car.png', 'slug' => '320i', 'type' => '1', // Car or Types(brand-model...) 'category_id' => $bmw->id, 'in_home' => 1 ]); $a2015 = Category::create([ 'title' => ['ar' => '2015', 'en' => '2015','ur' => '2015'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => '2015', 'type' => '2', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $a2018 = Category::create([ 'title' => ['ar' => '2018', 'en' => '2018','ur' => '2018'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => '2018', 'type' => '2', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $a2025 = Category::create([ 'title' => ['ar' => '2025', 'en' => '2025','ur' => '2025'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => '2025', 'type' => '2', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $petrol = Category::create([ 'title' => ['ar' => 'بنزين', 'en' => 'Petrol','ur' => 'Petrol'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'petrol', 'type' => '3', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $diesel = Category::create([ 'title' => ['ar' => 'ديزل', 'en' => 'Diesel','ur' => 'Diesel'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'diesel', 'type' => '3', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $hybrid = Category::create([ 'title' => ['ar' => 'هيبريد', 'en' => 'Hybrid','ur' => 'Hybrid'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'hybrid', 'type' => '3', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $electric = Category::create([ 'title' => ['ar' => 'كهرباء', 'en' => 'Electric','ur' => 'Electric'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'electric', 'type' => '3', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $automatic = Category::create([ 'title' => ['ar' => 'أوتوماتيك', 'en' => 'Automatic','ur' => 'Automatic'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'automatic', 'type' => '4', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $manual = Category::create([ 'title' => ['ar' => 'يدوي', 'en' => 'Manual','ur' => 'Manual'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'manual', 'type' => '4', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $european = Category::create([ 'title' => ['ar' => 'أوروبي', 'en' => 'European','ur' => 'European'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'european', 'type' => '5', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $american = Category::create([ 'title' => ['ar' => 'أمريكي', 'en' => 'American','ur' => 'American'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'american', 'type' => '5', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $red = Category::create([ 'title' => ['ar' => 'احمر', 'en' => 'Red','ur' => 'Red'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'red', 'type' => '6', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $white = Category::create([ 'title' => ['ar' => 'أبيض', 'en' => 'White','ur' => 'White'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'white', 'type' => '6', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $black = Category::create([ 'title' => ['ar' => 'أسود', 'en' => 'Black','ur' => 'Black'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'black', 'type' => '6', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $sedan = Category::create([ 'title' => ['ar' => 'سيدان', 'en' => 'Sedan','ur' => 'Sedan'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'sedan', 'type' => '7', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $suv = Category::create([ 'title' => ['ar' => 'suv', 'en' => 'suv','ur' => 'suv'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'suv', 'type' => '7', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $hatchback = Category::create([ 'title' => ['ar' => 'هاتشباك', 'en' => 'Hatchback','ur' => 'Hatchback'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'hatchback', 'type' => '7', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $van = Category::create([ 'title' => ['ar' => 'فان', 'en' => 'Van','ur' => 'Van'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'van', 'type' => '7', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $pickup = Category::create([ 'title' => ['ar' => 'بيك اب', 'en' => 'Pickup','ur' => 'Pickup'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'pickup', 'type' => '7', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $luxury = Category::create([ 'title' => ['ar' => 'لوكس', 'en' => 'Luxury','ur' => 'Luxury'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'luxury', 'type' => '7', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $other = Category::create([ 'title' => ['ar' => 'أخرى', 'en' => 'Other','ur' => 'Other'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'other', 'type' => '7', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $economy = Category::create([ 'title' => ['ar' => 'اقتصادي', 'en' => 'economy','ur' => 'economy'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'economy', 'type' => '9', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $standard = Category::create([ 'title' => ['ar' => 'معتاد', 'en' => 'standard','ur' => 'standard'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'standard', 'type' => '9', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $premium = Category::create([ 'title' => ['ar' => 'بريميوم', 'en' => 'premium','ur' => 'premium'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'premium', 'type' => '9', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $luxury = Category::create([ 'title' => ['ar' => 'لوكس', 'en' => 'luxury','ur' => 'luxury'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'luxury', 'type' => '9', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $suv = Category::create([ 'title' => ['ar' => 'suv', 'en' => 'suv','ur' => 'suv'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'suv', 'type' => '9', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $van = Category::create([ 'title' => ['ar' => 'فان', 'en' => 'van','ur' => 'van'], 'position' => 1, 'active' => 1, 'image' => null, 'icon' => null, 'slug' => 'van', 'type' => '9', // Car or Types(brand-model...) 'category_id' => null, 'in_home' => 1 ]); $city = City::create([ 'title' => ['ar' => 'القاهرة', 'en' => 'Cairo','ur' => 'Cairo'], 'position' => 1, 'active' => 1, 'image' => null, ]); $area = City::create([ 'title' => ['ar' => 'القاهرة', 'en' => 'Cairo','ur' => 'Cairo'], 'city_id' => $city->id, 'position' => 1, 'active' => 1, 'image' => null, ]); $office = Office::create([ 'first_name' => 'mohamed', 'last_name' => 'abdelaleam', 'name' => 'mohamed abdelaleam', 'phone' => '01123123123', 'full_phone' => '+2001123123123', 'phone_code' => '+20', 'image' => null, 'email' => 'office@gmail.com', 'email_verified_at' => now(), 'password' => Hash::make('password'), 'active' => 1, 'is_verify' => 1, 'featured' => 1, 'city_id' => $city->id, 'area_id' => $area->id, 'address' => ['ar' => 'دمياط دمياط الجديده', 'en' => 'Damiata , Damiata El Ghadida'], 'latitude' => 30.0444, 'longitude' => 31.2357, 'map_link' => 'https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3453.386008987493!2d31.2357!3d30.0444!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x14583fa60b21beeb%3A0x79dfb296e8423b89!2sEl-Geish%20St%2C%20El-Haram%2C%20Cairo!5e0!3m2!1sen!2seg!4v1719096666083!5m2!1sen!2seg', 'slug' => 'go-car', 'company_name' => 'go-car', 'commercial_registration_number' => '1234567890', 'license_number' => '1234567890', 'tax_certificate_number' => '1234567890', 'chamber_of_commerce_number' => '1234567890', ]); $car = Car::create([ 'active' => 1, 'best_deal' => 0, 'sponsored' => 0, 'featured' => 0, 'in_home' => 0, 'status_id' => null, 'expired_at' => now()->addDays(30), 'title' => ['ar' => 'سيارة', 'en' => 'Car','ur' => 'Car'], 'sub_title' => ['ar' => 'سيارة', 'en' => 'Car','ur' => 'Car'], 'description' => ['ar' => 'سيارة', 'en' => 'Car','ur' => 'Car'], 'tags' => ['320i', 'bmw', 'cars'], 'keywords' => ['320i', 'bmw', 'cars'], 'slug' => 'car', 'plate_number' => '1234567890', 'code' => '1234567890', 'price' => 100000, 'special_price' => 100000, 'discount' => 100000, 'accept_immediately' => 1, 'immediately_time' => now()->addDays(30), 'seating_capacity' => 1, 'daily_price' => 100000, 'weekly_price' => 100000, 'monthly_price' => 100000, 'daily_mileage_limit' => 100000, 'excess_mileage_fee' => 100000, 'is_available' => 1, 'no_views' => 1, 'position' => 1, 'payment_method' => 1, 'branch_id' => null, 'office_id' => $office->id, 'tags' => ['bmw', 'cars'], 'keywords' => ['bmw', 'cars'], 'image' => null, 'vehicle_type_id' => $suv->id, // 'sedan', 'suv', 'hatchback', 'van', 'pickup', 'luxury', 'other' 'brand_id' => $bmw->id, // brand 'model_id' => $a320i->id, // brand 'year_id' => $a2015->id, // year 'category_id' => $economy->id, // 'economy', 'standard', 'premium', 'luxury', 'suv', 'van' 'fuel_type_id' => $petrol->id, // 'petrol', 'diesel', 'hybrid', 'electric' 'transmission_id' => $automatic->id, // 'manual', 'automatic' 'insurance_type_id' => $european->id, // 'comprehensive', 'third_party' 'color_id' => $red->id, // 'comprehensive', 'third_party' 'branch_id' => null, 'office_id' => $office->id, 'car_license' => '1234567890', ]); $car = Car::create([ 'active' => 1, 'best_deal' => 0, 'sponsored' => 0, 'featured' => 0, 'in_home' => 0, 'status_id' => null, 'expired_at' => now()->addDays(30), 'title' => ['ar' => 'سيارة', 'en' => 'Car','ur' => 'Car'], 'sub_title' => ['ar' => 'سيارة', 'en' => 'Car','ur' => 'Car'], 'description' => ['ar' => 'سيارة', 'en' => 'Car','ur' => 'Car'], 'tags' => ['c180', 'mercedes', 'cars'], 'keywords' => ['c180', 'mercedes', 'cars'], 'slug' => 'car', 'plate_number' => '1234567890', 'code' => '1234567890', 'price' => 100000, 'special_price' => 100000, 'discount' => 100000, 'accept_immediately' => 1, 'immediately_time' => now()->addDays(30), 'seating_capacity' => 1, 'daily_price' => 100000, 'weekly_price' => 100000, 'monthly_price' => 100000, 'daily_mileage_limit' => 100000, 'excess_mileage_fee' => 100000, 'is_available' => 1, 'no_views' => 1, 'position' => 1, 'payment_method' => 1, 'branch_id' => null, 'office_id' => $office->id, 'tags' => ['mercedes', 'cars'], 'keywords' => ['mercedes', 'cars'], 'image' => null, 'vehicle_type_id' => $suv->id, // 'sedan', 'suv', 'hatchback', 'van', 'pickup', 'luxury', 'other' 'brand_id' => $mercedes->id, // brand 'model_id' => $c180->id, // brand 'year_id' => $a2018->id, // year 'category_id' => $standard->id, // 'economy', 'standard', 'premium', 'luxury', 'suv', 'van' 'fuel_type_id' => $petrol->id, // 'petrol', 'diesel', 'hybrid', 'electric' 'transmission_id' => $automatic->id, // 'manual', 'automatic' 'insurance_type_id' => $european->id, // 'comprehensive', 'third_party' 'color_id' => $white->id, // 'comprehensive', 'third_party' 'branch_id' => null, 'office_id' => $office->id, 'car_license' => '1234567890', ]); $car = Car::create([ 'active' => 1, 'best_deal' => 0, 'sponsored' => 0, 'featured' => 0, 'in_home' => 0, 'status_id' => null, 'expired_at' => now()->addDays(30), 'title' => ['ar' => 'سيارة', 'en' => 'Car','ur' => 'Car'], 'sub_title' => ['ar' => 'سيارة', 'en' => 'Car','ur' => 'Car'], 'description' => ['ar' => 'سيارة', 'en' => 'Car','ur' => 'Car'], 'tags' => ['a3', 'audi', 'cars'], 'keywords' => ['a3', 'audi', 'cars'], 'slug' => 'car', 'plate_number' => '1234567890', 'code' => '1234567890', 'price' => 100000, 'special_price' => 100000, 'discount' => 100000, 'accept_immediately' => 1, 'immediately_time' => now()->addDays(30), 'seating_capacity' => 1, 'daily_price' => 100000, 'weekly_price' => 100000, 'monthly_price' => 100000, 'daily_mileage_limit' => 100000, 'excess_mileage_fee' => 100000, 'is_available' => 1, 'no_views' => 1, 'position' => 1, 'payment_method' => 1, 'branch_id' => null, 'office_id' => $office->id, 'image' => null, 'vehicle_type_id' => $suv->id, // 'sedan', 'suv', 'hatchback', 'van', 'pickup', 'luxury', 'other' 'brand_id' => $audi->id, // brand 'model_id' => $a3->id, // brand 'year_id' => $a2018->id, // year 'category_id' => $economy->id, // 'economy', 'standard', 'premium', 'luxury', 'suv', 'van' 'fuel_type_id' => $petrol->id, // 'petrol', 'diesel', 'hybrid', 'electric' 'transmission_id' => $automatic->id, // 'manual', 'automatic' 'insurance_type_id' => $european->id, // 'comprehensive', 'third_party' 'color_id' => $black->id, // 'comprehensive', 'third_party' 'branch_id' => null, 'office_id' => $office->id, 'car_license' => '1234567890', ]); } }
SAVE
CANCEL