model() публичный Метод

public model ( ) : Reply
Результат Reply
Пример #1
0
 /**
  * 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
 /**
  * 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));
     }
 }