note; $date_time = $req->date_time; $sav = new Note; $sav->note = $note; $sav->user_id = Auth::user()->id; $sav->time = $date_time; $sav->save(); return redirect()->back(); } public function change_note_status($id){ $ch = Note::find($id); if($ch->status == 1){ $ch->status = 0; } else{ $ch->status = 1; } $ch->save(); return redirect()->back(); } public function remove_note($id){ $del = Note::find($id)->delete(); return redirect()->back(); } }