Exemplo n.º 1
0
 public static function addNew($user_id, $color_id, $content)
 {
     $note = new UserNote();
     $note->text = $content;
     $note->user_id = $user_id;
     $note->note_color_id = $color_id;
     $note->save();
 }
Exemplo n.º 2
0
 public function doChangeUserNote(Request $request)
 {
     $note = UserNote::findOrFail($request->input('note_id'));
     $note->updateText($request->input('new_content'));
 }
Exemplo n.º 3
0
 public function getNotesToDosAndReminders()
 {
     $user_notes = UserNote::where('user_id', $this->id)->get();
     return $user_notes;
 }