9
9
use Cmgmyr \Messenger \Models \Thread ;
10
10
use Illuminate \Database \Eloquent \ModelNotFoundException ;
11
11
use Illuminate \Support \Facades \Auth ;
12
- use Illuminate \Support \Facades \Input ;
12
+ use Illuminate \Support \Facades \Request ;
13
13
use Illuminate \Support \Facades \Session ;
14
14
15
15
class MessagesController extends Controller
@@ -80,7 +80,7 @@ public function create()
80
80
*/
81
81
public function store ()
82
82
{
83
- $ input = Input ::all ();
83
+ $ input = Request ::all ();
84
84
85
85
$ thread = Thread::create ([
86
86
'subject ' => $ input ['subject ' ],
@@ -101,7 +101,7 @@ public function store()
101
101
]);
102
102
103
103
// Recipients
104
- if (Input ::has ('recipients ' )) {
104
+ if (Request ::has ('recipients ' )) {
105
105
$ thread ->addParticipant ($ input ['recipients ' ]);
106
106
}
107
107
@@ -130,7 +130,7 @@ public function update($id)
130
130
Message::create ([
131
131
'thread_id ' => $ thread ->id ,
132
132
'user_id ' => Auth::id (),
133
- 'body ' => Input:: get ('message ' ),
133
+ 'body ' => Request:: input ('message ' ),
134
134
]);
135
135
136
136
// Add replier as a participant
@@ -142,8 +142,8 @@ public function update($id)
142
142
$ participant ->save ();
143
143
144
144
// Recipients
145
- if (Input ::has ('recipients ' )) {
146
- $ thread ->addParticipant (Input:: get ('recipients ' ));
145
+ if (Request ::has ('recipients ' )) {
146
+ $ thread ->addParticipant (Request:: input ('recipients ' ));
147
147
}
148
148
149
149
return redirect ()->route ('messages.show ' , $ id );
0 commit comments