PHP Class Socieboy\Forum\Jobs\Replies\PostReply

Inheritance: extends App\Jobs\Job, implements Illuminate\Contracts\Bus\SelfHandling
Show file Open project: socieboy/forum

Protected Properties

Property Type Description
$conversation_id integer
$message string

Public Methods

Method Description
__construct ( Request $request ) Create a new job instance.
handle ( ReplyRepo $replyRepo, Illuminate\Mail\Mailer $mailer ) : void Execute the job.
prepareData ( ) : array Prepare an array to fill the reply model.
sendEmail ( Illuminate\Mail\Mailer $mailer, Reply $reply ) Send an email to the conversation owner.

Protected Methods

Method Description
authUserIsOwner ( $conversation ) : boolean Return true if the auth user is the owner of the conversation where the reply was left

Method Details

__construct() public method

Create a new job instance.
public __construct ( Request $request )
$request Request

authUserIsOwner() protected method

Return true if the auth user is the owner of the conversation where the reply was left
protected authUserIsOwner ( $conversation ) : boolean
$conversation
return boolean

handle() public method

Execute the job.
public handle ( ReplyRepo $replyRepo, Illuminate\Mail\Mailer $mailer ) : void
$replyRepo Socieboy\Forum\Entities\Replies\ReplyRepo
$mailer Illuminate\Mail\Mailer
return void

prepareData() public method

Prepare an array to fill the reply model.
public prepareData ( ) : array
return array

sendEmail() public method

Send an email to the conversation owner.
public sendEmail ( Illuminate\Mail\Mailer $mailer, Reply $reply )
$mailer Illuminate\Mail\Mailer
$reply Socieboy\Forum\Entities\Replies\Reply

Property Details

$conversation_id protected property

protected int $conversation_id
return integer

$message protected property

protected string $message
return string