diff --git a/examples/MessagesController.php b/examples/MessagesController.php index ff91127..cad0bc9 100644 --- a/examples/MessagesController.php +++ b/examples/MessagesController.php @@ -9,7 +9,7 @@ use Cmgmyr\Messenger\Models\Thread; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Input; +use Illuminate\Support\Facades\Request; use Illuminate\Support\Facades\Session; class MessagesController extends Controller @@ -80,7 +80,7 @@ public function create() */ public function store() { - $input = Input::all(); + $input = Request::all(); $thread = Thread::create([ 'subject' => $input['subject'], @@ -101,7 +101,7 @@ public function store() ]); // Recipients - if (Input::has('recipients')) { + if (Request::has('recipients')) { $thread->addParticipant($input['recipients']); } @@ -130,7 +130,7 @@ public function update($id) Message::create([ 'thread_id' => $thread->id, 'user_id' => Auth::id(), - 'body' => Input::get('message'), + 'body' => Request::input('message'), ]); // Add replier as a participant @@ -142,8 +142,8 @@ public function update($id) $participant->save(); // Recipients - if (Input::has('recipients')) { - $thread->addParticipant(Input::get('recipients')); + if (Request::has('recipients')) { + $thread->addParticipant(Request::input('recipients')); } return redirect()->route('messages.show', $id);