60 lines
1.7 KiB
PHP
60 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
use App\Models\AboutMe;
|
|
use App\Models\Skill;
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class AboutMeSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run()
|
|
{
|
|
// ایجاد رکورد AboutMe
|
|
$aboutMe = AboutMe::create([
|
|
'title' => 'About Me Title',
|
|
'description' => 'This is a brief description about me.',
|
|
'image' => '/images/profile.png',
|
|
]);
|
|
|
|
// ایجاد رکوردهای Skill
|
|
Skill::create([
|
|
'title' => 'FrontEnd',
|
|
'image' => '/images/frontend.png',
|
|
'description' => 'UI design description.',
|
|
'link' => 'http://example.com/frontend',
|
|
'percentage' => 90,
|
|
'about_me_id' => $aboutMe->id,
|
|
]);
|
|
|
|
Skill::create([
|
|
'title' => 'BackEnd',
|
|
'image' => '/images/backend.png',
|
|
'description' => 'BackEnd description.',
|
|
'link' => 'http://example.com/backend',
|
|
'percentage' => 80,
|
|
'about_me_id' => $aboutMe->id,
|
|
]);
|
|
Skill::create([
|
|
'title' => 'UI Design',
|
|
'image' => '/images/ui.png',
|
|
'description' => 'UI design description.',
|
|
'link' => 'http://example.com/ui',
|
|
'percentage' => 70,
|
|
'about_me_id' => $aboutMe->id,
|
|
]);
|
|
|
|
Skill::create([
|
|
'title' => 'UX Design',
|
|
'image' => '/images/ux.png',
|
|
'description' => 'UX design description.',
|
|
'link' => 'http://example.com/ux',
|
|
'percentage' => 83,
|
|
'about_me_id' => $aboutMe->id,
|
|
]);
|
|
}
|
|
}
|