mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
- 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
27 lines
No EOL
482 B
Markdown
27 lines
No EOL
482 B
Markdown
---
|
|
title: Laravel Horizon integration
|
|
extends: _layouts.documentation
|
|
section: content
|
|
---
|
|
|
|
# Laravel Horizon
|
|
|
|
Make sure your [queues]({{ $page->link('queues') }}) are configured correctly before using this.
|
|
|
|
## Tags
|
|
|
|
You may add the current tenant's id to your job tags by defining a `tags` method on the class:
|
|
|
|
```php
|
|
/**
|
|
* Get the tags that should be assigned to the job.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function tags()
|
|
{
|
|
return [
|
|
'tenant:' . tenant('id'),
|
|
];
|
|
}
|
|
``` |