Skip to content

Commit 538d068

Browse files
committed
altered: nicer example
1 parent 5cd6988 commit 538d068

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,18 +227,17 @@ use VladimirYuldashev\LaravelQueueRabbitMQ\Queue\Jobs\RabbitMQJob as BaseJob;
227227

228228
class RabbitMQJob extends BaseJob
229229
{
230-
231230
/**
232231
* Get the decoded body of the job.
233232
*
234233
* @return array
235234
*/
236235
public function payload()
237236
{
238-
$decoded = json_decode($this->getRawBody(), true);
239-
$decoded['job'] = $decoded['job'] ?? 'WhatheverFullyQualifiedClassNameToExecute@handle';
240-
241-
return $decoded;
237+
return [
238+
'job' => 'WhatheverFullyQualifiedClassNameToExecute@handle',
239+
'data' => json_decode($this->getRawBody(), true)
240+
];
242241
}
243242
}
244243
```

0 commit comments

Comments
 (0)