1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-06-17 10:22:03 +03:00
Files
bookstack/database/factories/Activity/Models/CommentFactory.php
Dan Brown 5e3c3ad634 Comments: Added back-end content reference handling
Also added archived property, to be added.
2025-04-18 21:13:49 +01:00

35 lines
717 B
PHP

<?php
namespace Database\Factories\Activity\Models;
use Illuminate\Database\Eloquent\Factories\Factory;
class CommentFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \BookStack\Activity\Models\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,
'parent_id' => null,
'local_id' => 1,
'content_ref' => '',
'archived' => false,
];
}
}