55 lines
1.7 KiB
PHP
55 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Enums\StaticPageType;
|
|
use App\Models\StaticPage;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class StaticPageSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
StaticPage::query()->updateOrCreate(
|
|
[
|
|
'type' => StaticPageType::contact,
|
|
],
|
|
[
|
|
'seo_title' => 'Seo title pour la page contactez nous',
|
|
'seo_description' => 'Seo description pour la page contactez nous',
|
|
'title' => 'Contactez-nous',
|
|
'type' => StaticPageType::contact,
|
|
'content' => \clean(\fake()->randomHtml(6, 7)),
|
|
]
|
|
);
|
|
StaticPage::query()->updateOrCreate(
|
|
[
|
|
'type' => StaticPageType::legals,
|
|
],
|
|
[
|
|
'seo_title' => 'Seo title pour la page mentions légales',
|
|
'seo_description' => 'Seo description pour la page mentions légales',
|
|
'title' => 'Mentions légales',
|
|
'type' => StaticPageType::legals,
|
|
'content' => \clean(\fake()->randomHtml(6, 7)),
|
|
]
|
|
);
|
|
StaticPage::query()->updateOrCreate(
|
|
[
|
|
'type' => StaticPageType::rules,
|
|
],
|
|
[
|
|
'seo_title' => 'Seo title pour la page charte de confidentialitée',
|
|
'seo_description' => 'Seo description pour la page charte de confidentialitée',
|
|
'title' => 'Charte de confidentialitée',
|
|
'type' => StaticPageType::rules,
|
|
'content' => \clean(\fake()->randomHtml(6, 7)),
|
|
]
|
|
);
|
|
}
|
|
}
|