Skip to content

Any way to change job queue? #45

Closed Answered by erenkulaksiz
erenkulaksiz asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind. Made my own job to send discord alerts. I'm not an php expert so you can expect some anti patterns or bad code.

app/Jobs/SendDiscordMessage.php

<?php

namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use App\Traits\DiscordMessager;

class SendDiscordMessage implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    protected $message;
    protected $types = [
        'purchase' => 'https://discord.com/api/webhooks/x', // #TODO: Put these in .env
        'cancel' => 'htt…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by erenkulaksiz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant