-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Phil
committed
Dec 12, 2022
1 parent
b0ff9fc
commit 8dd9205
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace Database\Factories; | ||
|
||
use App\News; | ||
use Illuminate\Database\Eloquent\Factories\Factory; | ||
use Illuminate\Support\Str; | ||
|
||
/** | ||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\News> | ||
*/ | ||
class NewsFactory extends Factory | ||
{ | ||
/** | ||
* The name of the factory's corresponding model. | ||
* | ||
* @var string | ||
*/ | ||
protected $model = News::class; | ||
|
||
/** | ||
* Define the model's default state. | ||
* | ||
* @return array<string, mixed> | ||
*/ | ||
public function definition() | ||
{ | ||
return [ | ||
'title' => $this->faker->text, | ||
'content' => $this->faker->paragraph($nbSentences = 5, $variableNbSentences = true), | ||
'user_id' => 1, | ||
'client_id' => 1 | ||
]; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
database/factories/ModelFactory.php → database/factories/UserFactory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters