⚡
Laravel Haystack
View Code On GithubEdit Docs
  • 🎯Getting Started
    • Introduction
    • How It Works
    • Installation
    • Usage
    • Configuration
    • Callback Events
  • 🛰️Cool Features
    • Shared Data
    • Shared Models
    • Long Delays & Pauses
    • Appending & Prepending Jobs
    • Chunking Jobs
  • 🗺️Next Up
    • Allowing Failed Jobs
    • Global Middleware
    • Connection, Queue & Delay
    • Naming Haystacks
    • Before Saving Hook
    • Custom Options
  • 🧼Cleanup
    • Deleting Stale Haystacks
    • Deleting Specific Haystacks
    • Clearing All Haystacks
  • 🛣️Finish
    • Support
    • Star On Github
    • Edit Documentation
Powered by GitBook
On this page
  1. Next Up

Naming Haystacks

You may wish to give your haystack a custom name. This is especially useful for debugging, as you could check your database and see what haystacks are currently being processed. To give the haystack a name, use the withName method when building the haystack.

<?php

$haystack = Haystack::build()
   ->withName('Process API Data')
   ->addJob(new RetrieveDataFromApi)
   ->addJob(new ProcessDataFromApi)
   ->addJob(new StoreDataFromApi)
PreviousConnection, Queue & DelayNextBefore Saving Hook

Last updated 2 years ago

🗺️