Skip to content

Commit 9cab074

Browse files
committed
Merge branch 'master' into v2
2 parents 3bdffe2 + fd855e7 commit 9cab074

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
],
1414
"require": {
1515
"php": "^7.1.3",
16-
"illuminate/config": "^5.5|^6.0",
17-
"illuminate/support": "^5.5|^6.0",
18-
"illuminate/database": "^5.5|^6.0"
16+
"illuminate/config": "^5.5|^6.0|^7.0",
17+
"illuminate/support": "^5.5|^6.0|^7.0",
18+
"illuminate/database": "^5.5|^6.0|^7.0"
1919
},
2020
"require-dev": {
2121
"adamwathan/faktory": "0.3.*",
2222
"friendsofphp/php-cs-fixer": "^2.5",
23-
"orchestra/testbench": "^3.0|^4.0",
23+
"orchestra/testbench": "^3.0|^4.0|^5.0",
2424
"phpunit/phpunit": "^7.0"
2525
},
2626
"autoload": {

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)