finished api
This commit is contained in:
27
laravel/database/factories/BilletFactory.php
Normal file
27
laravel/database/factories/BilletFactory.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Billet>
|
||||
*/
|
||||
class BilletFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'BIL_DATE' => $this->faker->date(),
|
||||
'BIL_TITRE' => $this->faker->text(20),
|
||||
'BIL_CONTENU' => $this->faker->text(100),
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
];
|
||||
}
|
||||
}
|
||||
26
laravel/database/factories/CommentairesFactory.php
Normal file
26
laravel/database/factories/CommentairesFactory.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Commentaires>
|
||||
*/
|
||||
class CommentairesFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'COM_DATE' => now(),
|
||||
'COM_CONTENU' => fake()->text(200),
|
||||
'billet_id' => fake()->numberBetween(1, 10),
|
||||
'user_id' => fake()->numberBetween(1, 2),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user