Laravel 9: authenticate while running a command
Here is an example of Laravel command: class TestUserCommand extends Command { protected $signature = 'test:user'; protected $description = 'Command description'; public function handle(): void { auth('api')->loginUsingId(1); ... domain service call } } It gives me the following error: Method…