99use Cmgmyr \Messenger \Models \Thread ;
1010use Illuminate \Database \Eloquent \ModelNotFoundException ;
1111use Illuminate \Support \Facades \Auth ;
12- use Illuminate \Support \Facades \Input ;
12+ use Illuminate \Support \Facades \Request ;
1313use Illuminate \Support \Facades \Session ;
1414
1515class MessagesController extends Controller
@@ -80,7 +80,7 @@ public function create()
8080 */
8181 public function store ()
8282 {
83- $ input = Input ::all ();
83+ $ input = Request ::all ();
8484
8585 $ thread = Thread::create ([
8686 'subject ' => $ input ['subject ' ],
@@ -101,7 +101,7 @@ public function store()
101101 ]);
102102
103103 // Recipients
104- if (Input ::has ('recipients ' )) {
104+ if (Request ::has ('recipients ' )) {
105105 $ thread ->addParticipant ($ input ['recipients ' ]);
106106 }
107107
@@ -130,7 +130,7 @@ public function update($id)
130130 Message::create ([
131131 'thread_id ' => $ thread ->id ,
132132 'user_id ' => Auth::id (),
133- 'body ' => Input:: get ('message ' ),
133+ 'body ' => Request:: input ('message ' ),
134134 ]);
135135
136136 // Add replier as a participant
@@ -142,8 +142,8 @@ public function update($id)
142142 $ participant ->save ();
143143
144144 // Recipients
145- if (Input ::has ('recipients ' )) {
146- $ thread ->addParticipant (Input:: get ('recipients ' ));
145+ if (Request ::has ('recipients ' )) {
146+ $ thread ->addParticipant (Request:: input ('recipients ' ));
147147 }
148148
149149 return redirect ()->route ('messages.show ' , $ id );
0 commit comments