You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xshop/database/seeders/PartSeeder.php

27 lines
509 B
PHTML

<?php
namespace Database\Seeders;
use App\Models\Area;
use App\Models\Part;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class PartSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
//
$part = new Part();
$part->segment = 'preloader';
$part->part = 'PreloaderImage';
$part->area_id = Area::where('name','preloader')->first()->id;
$part->save();
}
}