feat: add menu item to seed example receipts

This commit is contained in:
Benjamin Nussbaum 2025-03-25 21:21:18 +01:00
parent 8eb0b2ccd7
commit 0c0a3026ce
3 changed files with 74 additions and 24 deletions

View file

@ -0,0 +1,20 @@
<?php
namespace App\Console\Commands;
use Database\Seeders\ExampleReceiptsSeeder;
use Illuminate\Console\Command;
use Illuminate\Contracts\Console\PromptsForMissingInput;
class ExampleReceiptsSeederCommand extends Command implements PromptsForMissingInput
{
protected $signature = 'receipts:seed {user_id}';
protected $description = 'Seed example receipts';
public function handle(ExampleReceiptsSeeder $seeder): void
{
$user_id = $this->argument('user_id');
$seeder->run($user_id);
}
}