Replace icons with lucide and work on quote
parent
b3868e8b0a
commit
913a4477a7
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Quote;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class QuoteFactory extends Factory
|
||||
{
|
||||
protected $model = Quote::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'body' => $this->faker->realText(300),
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Order;
|
||||
use App\Models\Quote;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class QuoteSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
foreach (Order::all() as $order) {
|
||||
if (rand(0, 3) >= 1) {
|
||||
Quote::factory()->for($order)->create();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue