public function postAddNote(AddNote $request) { $private = 0; if ($request->input('private')) { $private = 1; } $user = auth()->user(); $note = new Notes(); $note->character_id = $request->input('character_id'); $note->title = $request->input('title'); $note->details = $request->input('details'); $note->private = $private; $note->updated_by = $user->id; $note->save(); return redirect()->back()->with('success', trans('notes::seat.note_added')); }
/** * @param $note_id * * @return mixed */ public function getNote($note_id) { return Notes::findOrFail($note_id); }