model() public method

public model ( ) : Reply
return Reply
コード例 #1
0
ファイル: PostReply.php プロジェクト: jadulled/forum
 /**
  * Execute the job.
  *
  * @param ReplyRepo $replyRepo
  * @param Mailer $mailer
  * @return void
  */
 public function handle(ReplyRepo $replyRepo, Mailer $mailer)
 {
     $reply = $replyRepo->model();
     $reply->fill($this->prepareData());
     $reply->save();
     if (config('config.forum.emails.fire')) {
         $this->sendEmail($mailer, $reply);
     }
 }
 /**
  * Execute the job.
  *
  * @param ReplyRepo $replyRepo
  * @param Mailer $mailer
  * @return void
  */
 public function handle(ReplyRepo $replyRepo, Mailer $mailer)
 {
     $reply = $replyRepo->model();
     $reply->fill($this->prepareData());
     $reply->save();
     if (config('forum.emails.fire') && auth()->user()->id != $reply->user_id) {
         $this->sendEmail($mailer, $reply);
     }
     if (config('forum.broadcasting') && auth()->user()->id != $reply->user_id) {
         event(new NewReply($reply));
     }
 }
コード例 #3
0
ファイル: PostReply.php プロジェクト: teranode/forum
 /**
  * Execute the job.
  *
  * @param ReplyRepo $replyRepo
  * @param Mailer    $mailer
  *
  * @return void
  */
 public function handle(ReplyRepo $replyRepo, Mailer $mailer)
 {
     $reply = $replyRepo->model();
     $reply->fill($this->prepareData());
     $reply->save();
     if (config('forum.emails.fire') && !$this->authUserIsOwner($reply->conversation)) {
         $this->sendEmail($mailer, $reply);
     }
     if (config('forum.broadcasting') && !$this->authUserIsOwner($reply->conversation)) {
         event(new NewReply($reply));
     }
 }