Added rest of files
This commit is contained in:
committed by
shaun collins
parent
646041230b
commit
09c4bd02ff
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Blog;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
class BlogSeed extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$this->records()->each(function ($record) {
|
||||
echo 'Processing: '.$record['slug'].PHP_EOL;
|
||||
Blog::updateOrCreate([
|
||||
'slug' => $record['slug'],
|
||||
], $record);
|
||||
});
|
||||
}
|
||||
|
||||
private function records(): Collection
|
||||
{
|
||||
return collect([
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user