mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-12-05 07:23:59 +08:00
33 lines
639 B
PHP
33 lines
639 B
PHP
|
<?php
|
||
|
|
||
|
namespace Database\Factories\Actions;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||
|
|
||
|
class CommentFactory extends Factory
|
||
|
{
|
||
|
/**
|
||
|
* The name of the factory's corresponding model.
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $model = \BookStack\Actions\Comment::class;
|
||
|
|
||
|
/**
|
||
|
* Define the model's default state.
|
||
|
*
|
||
|
* @return array
|
||
|
*/
|
||
|
public function definition()
|
||
|
{
|
||
|
$text = $this->faker->paragraph(1);
|
||
|
$html = '<p>' . $text . '</p>';
|
||
|
|
||
|
return [
|
||
|
'html' => $html,
|
||
|
'text' => $text,
|
||
|
'parent_id' => null,
|
||
|
];
|
||
|
}
|
||
|
}
|