locale = $locale; } /** * @return Collection */ public function collection() { return collect([ new User([ 'firstname' => 'Patrick', 'lastname' => 'Brouwers', ]), ]); } /** * @return string|null */ public function preferredLocale() { return $this->locale; } /** * @param iterable $rows * @return iterable */ public function prepareRows($rows) { Assert::assertEquals('ru', app()->getLocale()); app()->bind('queue-has-correct-locale', function () { return true; }); return $rows; } }