Test Setup Failed
Push — dev6 ( 81193f...01d104 )
by Ron
22:34
created

UserEmailNotificationsController::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 2
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Http\Controllers\User;
4
5
use App\Http\Controllers\Controller;
6
use App\Models\UserEmailNotifications;
7
use App\Http\Requests\User\UserEmailNotificationsRequest;
8
9
class UserEmailNotificationsController extends Controller
10
{
11
    /**
12
     *  Update the users email notification settings
13
     */
14
    public function update(UserEmailNotificationsRequest $request, $id)
15
    {
16
        $user = UserEmailNotifications::findOrFail($id);
17
        $user->update($request->toArray());
18
19
        return back()->with(['message' => 'Email Notifications Updated', 'type' => 'success']);
20
    }
21
}
22