🌱 🏗️ ⬆️ ✨add expense table 🎨 🔧
This commit is contained in:
28
database/factories/ExpenseFactory.php
Normal file
28
database/factories/ExpenseFactory.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Model>
|
||||
*/
|
||||
class ExpenseFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'id_user' => 1,
|
||||
'id_type_expenses' => 1,
|
||||
'amount' => fake()->randomFloat(),
|
||||
'description' => Str::random(90),
|
||||
'date' => fake()->date(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ class IncomeFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'id_user' => 1,
|
||||
'id_type_income' => 1,
|
||||
'id_type_incomes' => 1,
|
||||
'amount' => fake()->randomFloat(),
|
||||
'description' => Str::random(90),
|
||||
'date' => fake()->date(),
|
||||
|
||||
Reference in New Issue
Block a user