mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Re-structured the app code to be feature based rather than code type based
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
|
|
||||
*/
|
||||
|
||||
$factory->define(BookStack\User::class, function ($faker) {
|
||||
$factory->define(\BookStack\Auth\User::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->email,
|
||||
@ -21,7 +21,7 @@ $factory->define(BookStack\User::class, function ($faker) {
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(BookStack\Bookshelf::class, function ($faker) {
|
||||
$factory->define(\BookStack\Entities\Bookshelf::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->sentence,
|
||||
'slug' => str_random(10),
|
||||
@ -29,7 +29,7 @@ $factory->define(BookStack\Bookshelf::class, function ($faker) {
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(BookStack\Book::class, function ($faker) {
|
||||
$factory->define(\BookStack\Entities\Book::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->sentence,
|
||||
'slug' => str_random(10),
|
||||
@ -37,7 +37,7 @@ $factory->define(BookStack\Book::class, function ($faker) {
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(BookStack\Chapter::class, function ($faker) {
|
||||
$factory->define(\BookStack\Entities\Chapter::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->sentence,
|
||||
'slug' => str_random(10),
|
||||
@ -45,7 +45,7 @@ $factory->define(BookStack\Chapter::class, function ($faker) {
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(BookStack\Page::class, function ($faker) {
|
||||
$factory->define(\BookStack\Entities\Page::class, function ($faker) {
|
||||
$html = '<p>' . implode('</p>', $faker->paragraphs(5)) . '</p>';
|
||||
return [
|
||||
'name' => $faker->sentence,
|
||||
@ -56,21 +56,21 @@ $factory->define(BookStack\Page::class, function ($faker) {
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(BookStack\Role::class, function ($faker) {
|
||||
$factory->define(\BookStack\Auth\Role::class, function ($faker) {
|
||||
return [
|
||||
'display_name' => $faker->sentence(3),
|
||||
'description' => $faker->sentence(10)
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(BookStack\Tag::class, function ($faker) {
|
||||
$factory->define(\BookStack\Actions\Tag::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->city,
|
||||
'value' => $faker->sentence(3)
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(BookStack\Image::class, function ($faker) {
|
||||
$factory->define(\BookStack\Uploads\Image::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->slug . '.jpg',
|
||||
'url' => $faker->url,
|
||||
@ -80,7 +80,7 @@ $factory->define(BookStack\Image::class, function ($faker) {
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(BookStack\Comment::class, function($faker) {
|
||||
$factory->define(\BookStack\Actions\Comment::class, function($faker) {
|
||||
$text = $faker->paragraph(1);
|
||||
$html = '<p>' . $text. '</p>';
|
||||
return [
|
||||
|
Reference in New Issue
Block a user