Skip to content

Commit

Permalink
Merge branch 'master' into v2
Browse files Browse the repository at this point in the history
  • Loading branch information
cmgmyr committed Mar 9, 2020
2 parents 3bdffe2 + fd855e7 commit 9cab074
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
],
"require": {
"php": "^7.1.3",
"illuminate/config": "^5.5|^6.0",
"illuminate/support": "^5.5|^6.0",
"illuminate/database": "^5.5|^6.0"
"illuminate/config": "^5.5|^6.0|^7.0",
"illuminate/support": "^5.5|^6.0|^7.0",
"illuminate/database": "^5.5|^6.0|^7.0"
},
"require-dev": {
"adamwathan/faktory": "0.3.*",
"friendsofphp/php-cs-fixer": "^2.5",
"orchestra/testbench": "^3.0|^4.0",
"orchestra/testbench": "^3.0|^4.0|^5.0",
"phpunit/phpunit": "^7.0"
},
"autoload": {
Expand Down
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 9cab074

Please sign in to comment.