update deploy
This commit is contained in:
29
database/factories/PageFactory.php
Normal file
29
database/factories/PageFactory.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Page;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends Factory<Page>
|
||||
*/
|
||||
class PageFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$title = fake()->unique()->words(3, true);
|
||||
|
||||
return [
|
||||
'slug' => Str::slug($title),
|
||||
'title' => ucfirst($title),
|
||||
'meta_title' => fake()->sentence(4),
|
||||
'meta_description' => fake()->sentence(10),
|
||||
'is_active' => true,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user