Skip to content

Commit 89350a8

Browse files
committed
remove references to Input facade (Laravel 6.x upgrade)
1 parent f2de65c commit 89350a8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/MessagesController.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Cmgmyr\Messenger\Models\Thread;
1010
use Illuminate\Database\Eloquent\ModelNotFoundException;
1111
use Illuminate\Support\Facades\Auth;
12-
use Illuminate\Support\Facades\Input;
12+
use Illuminate\Support\Facades\Request;
1313
use Illuminate\Support\Facades\Session;
1414

1515
class 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

Comments
 (0)