Skip to content

Commit

Permalink
Merge pull request #322 from laxsmi/master
Browse files Browse the repository at this point in the history
remove references to Input facade (Laravel 6.x upgrade)
  • Loading branch information
cmgmyr authored Sep 17, 2019
2 parents f2de65c + 89350a8 commit 2ba36ba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/MessagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -80,7 +80,7 @@ public function create()
*/
public function store()
{
$input = Input::all();
$input = Request::all();

$thread = Thread::create([
'subject' => $input['subject'],
Expand All @@ -101,7 +101,7 @@ public function store()
]);

// Recipients
if (Input::has('recipients')) {
if (Request::has('recipients')) {
$thread->addParticipant($input['recipients']);
}

Expand Down Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 2ba36ba

Please sign in to comment.