Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Partnerize Bundle Laravel Package

superbrave/partnerize-bundle

Symfony bundle that integrates the Partnerize affiliate network into your application. It wraps Partnerize API calls for click tracking, conversion reporting, and commission data, giving Symfony services a clean, configurable client for affiliate marketing workflows.

View on GitHub
Deep Wiki
Context7

Getting Started

This package is centred on a Job model — v1.0.0 adds a status constant to it and ships documentation with a worked example. The docs example is the fastest path in; it is the only canonical usage pattern published so far, so read it end-to-end before writing your own wiring.

Minimal path:

  1. Read the docs example first. It defines the intended lifecycle (create a job record → act on it → read its status). Treat it as the reference implementation and copy its shape before improvising.
  2. Resolve the Job model early. Confirm the fully-qualified class name and whether it collides with anything already in your app — most Laravel apps already have a jobs table (the queue driver's) and possibly their own Job/OrderJob domain models. Check the migration/table name the package expects before running anything.
  3. Locate the status constant. v1.0.0 exposes status as a class constant on the model. Confirm its exact name and value from the source, not from guesswork — the release note says "a status constant" (singular), so assume a single documented status value exists rather than a full enum of states.
  4. First use case: create a record through the model, persist it, then read the status back off the instance. That round-trip is the smallest thing that proves your install, config, and database are wired correctly.

If the docs example references a publishable config or migration, run those steps before touching the model — php artisan vendor:publish output is the usual place gaps show up.

Implementation Patterns

Use the constant as the single source of truth. Everywhere you would otherwise write 'pending' or 'completed', reference Job::STATUS_* instead. This is the main practical benefit of the v1.0.0 addition: one place to change if the stored value shifts. This matters most in:

  • Query scopes and where() clauses
  • Database seeders and factories
  • Blade/JSON serialisation and API resources
  • Test assertions and fixtures

Wrap status reads in scopes rather than repeating where calls. A scopePending() / scopeCompleted() pair on top of the constant keeps controllers and jobs readable and gives you one place to adapt when more statuses land in later releases.

Drive transitions through the model, not raw updates. If status changes happen via DB::table('jobs')->update(...) or a mass Model::where(...)->update(...), model events and observers are bypassed and your status values drift. Prefer $job->update(['status' => Job::STATUS_X]) or a dedicated markAs...() method so you can hang observers, events, and audit logging off the transition.

Integration points worth wiring deliberately:

  • Queued listeners/observers on status change to trigger notifications or downstream pipeline steps — but make them ShouldQueue so a slow side effect never blocks the transition write.
  • API resources for exposing status to a frontend poller, with the constant mapped to a human-readable label in one place.
  • Scheduled reconciliation (an artisan command) to catch records that stalled — useful if the package's status is written by an external process you don't fully control.

Testing. Assert against the constant (assertDatabaseHas(['status' => Job::STATUS_X])) rather than the literal string. It keeps tests green across a value change and documents intent.

Gotchas and Tips

  • A constant is not an enum. Nothing at the type level stops you passing an arbitrary string into the status column. Add a casts() entry, a validation rule, or a DB enum/check constraint if you need real enforcement. Don't assume the constant gives you validation.
  • Naming collision with Laravel's queue table. jobs is a reserved-ish name in a Laravel app. If the package's table is also jobs, you will get confusing behaviour in queue-heavy apps. Verify the table name in the migration before you deploy, and be explicit in every query rather than relying on the default connection's intuition.
  • The docs example is a happy path, not a spec. It was added in the same release as the status constant, so it likely covers creation and a status read — not retries, concurrency, multi-tenancy, authorisation, or failure handling. Don't infer those behaviours from it; check the source.
  • Status is probably not concurrency-safe by default. Two workers updating the same record can interleave. If transitions matter, use a conditional update (where('status', $from)->update(...)) and check the affected-row count rather than read-then-write.
  • Watch for stale reads on long-lived model instances. If you loaded a Job before a worker changed its status, your in-memory copy is wrong. refresh() before branching on status in any job that waits.
  • Debugging: when a status looks wrong, check in this order — (1) was the write done through the model or raw SQL, (2) is a saving/updating observer overwriting it, (3) is the column's default in the migration what you expect, (4) is a queue worker running old code after a deploy.
  • Extension points: the model is the natural subclass/override point. Traits for status helpers, accessors for display labels, and observers for side effects are all low-risk. Avoid editing vendor files — v1.0.0 is the first tagged release, so expect the surface to move; keep your customisations in your own classes so a composer update doesn't strand you.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib