Skip to content

Commit d68898d

Browse files
committed
Updated README.md with fully qualified namespaces
1 parent 04b012a commit d68898d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ QUEUE_DRIVER=sqs-plain
100100
If you plan to push plain messages from Laravel or Lumen, you can rely on DispatcherJob:
101101

102102
```php
103+
namespace App\Http\Controllers\Api;
104+
105+
use App\Http\Controllers\Controller;
103106
use Dusterio\PlainSqs\Jobs\DispatcherJob;
104107

105108
class ExampleController extends Controller
@@ -140,9 +143,12 @@ If a third-party application is creating custom-format JSON messages, just add a
140143
implement a handler class as follows:
141144

142145
```php
146+
namespace App\Jobs;
147+
143148
use Illuminate\Contracts\Queue\Job as LaravelJob;
149+
use Illuminate\Queue\Jobs\Job;
144150

145-
class HandlerJob extends Job
151+
class HealthCheckHandler extends Job
146152
{
147153
protected $data;
148154

@@ -158,10 +164,15 @@ class HandlerJob extends Job
158164
// Raw JSON payload from SQS, if necessary
159165
var_dump($job->getRawBody());
160166
}
161-
}
162167

168+
public function getRawBody() {}
169+
170+
public function getJobId() {}
171+
}
163172
```
164173

174+
Please note, we are declaring the `getRawBody` and `getJobId` methods to satisfy the abstract class requirements. However, these are not used when processing messages.
175+
165176
## Todo
166177

167178
1. Add more unit and integration tests

0 commit comments

Comments
 (0)