From 4a5d121dfbd315de10f13494b0285e4f1ae7de8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Solli?= Date: Tue, 23 Jun 2020 21:56:35 +0200 Subject: [PATCH] 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 --- source/docs/v3/integrations/horizon.blade.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/docs/v3/integrations/horizon.blade.md b/source/docs/v3/integrations/horizon.blade.md index 2d06dee..aac1293 100644 --- a/source/docs/v3/integrations/horizon.blade.md +++ b/source/docs/v3/integrations/horizon.blade.md @@ -8,13 +8,20 @@ section: content 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 +/** +* Get the tags that should be assigned to the job. +* +* @return array +*/ public function tags() { return [ - 'tenant' => tenant('id'), + 'tenant:' . tenant('id'), ]; } ``` \ No newline at end of file