public static function addNew($patient_id, $color_id, $content) { $note = new PatientNote(); $note->text = $content; $note->patient_id = $patient_id; $note->author_id = Auth::user()->id; $note->patient_note_color_id = $color_id; $note->save(); }
public function doUnpinPatientNote(Request $request) { $note = PatientNote::findOrFail($request->input('note_id')); $note->unpin(); }