Skip to content

Instantly share code, notes, and snippets.

@ridwanbejo
Last active June 6, 2020 14:49
Show Gist options
  • Save ridwanbejo/485a7017b7b6072ebd9bc0761d26cb37 to your computer and use it in GitHub Desktop.
Save ridwanbejo/485a7017b7b6072ebd9bc0761d26cb37 to your computer and use it in GitHub Desktop.
laravel-queue-sqs - HelloWorldJob.php v1
<?php
namespace App\Jobs;
class HelloWorldJob extends Job
{
protected $message;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($message)
{
$this->message = $message;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
echo "Running an hello world job ...\n";
echo "Queue Broker: AWS SQS\n";
echo "Processing message: ".$this->message."\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment