Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove references to Input facade (Laravel 6.x upgrade) #322

Merged
merged 1 commit into from
Sep 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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