Exemple #1
0
 /**
  * Execute the job.
  *
  */
 public function handle()
 {
     $this->validate($this->request, ['message' => 'string|required'], ['required' => 'o campo :attribute é obrigatório']);
     $postit = new PostIt($this->request->only('message') + ['status' => 10]);
     $postit->identifier()->associate($this->identifier);
     $postit->save();
     return $postit;
 }
 public function show($postit, Request $request)
 {
     $postit = PostIt::where(['post_its.id' => $postit])->hasVoted($this->getIdentity($request))->first();
     return $postit;
 }