mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 02:04:03 +00:00
Improved Horizon documentation regarding tags (#57)
- Fixed the snippet for passing tags to the job - Wrapped content in a Tags header to prepare for more content in the future - Added comment to method to mimic Laravel's documentation regardin the matter - Made it slightly more clear that the tags method should be applied to the actual job class
This commit is contained in:
parent
9949f888e4
commit
4a5d121dfb
1 changed files with 9 additions and 2 deletions
|
|
@ -8,13 +8,20 @@ section: content
|
||||||
|
|
||||||
Make sure your [queues]({{ $page->link('queues') }}) are configured correctly before using this.
|
Make sure your [queues]({{ $page->link('queues') }}) are configured correctly before using this.
|
||||||
|
|
||||||
You may add the current tenant's id to your job tags:
|
## Tags
|
||||||
|
|
||||||
|
You may add the current tenant's id to your job tags by defining a `tags` method on the class:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
|
/**
|
||||||
|
* Get the tags that should be assigned to the job.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function tags()
|
public function tags()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'tenant' => tenant('id'),
|
'tenant:' . tenant('id'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue