public function changeNotifications(Request $request)
    {
        $this->validate(
            $request,
            [
                'notifications' => 'required|array',
            ]
        );

        foreach ($request->input('notifications') as $notification => $enable) {
            Auth::user()->setNotification($notification, $enable);
        }

        Auth::user()->save();

        return redirect()->back()->withStatus(trans('mustard::account.notifications_changed'));
    }
public function changeNotifications(Request $request)
    {
        $this->validate(
            $request,
            [
                'notifications' => 'required|array',
            ]
        );

        foreach ($request->input('notifications') as $notification => $enable) {
            Auth::user()->setNotification($notification, $enable);
        }

        Auth::user()->save();

        return redirect()->back()->withStatus(trans('mustard::account.notifications_changed'));
    }
public function changeNotifications ( Request $ request ) { $ this -> validate ( $ request , [ 'notifications' => 'required|array' , ] ) ; foreach ( $ request -> input ( 'notifications' ) as $ notification => $ enable ) { Auth :: user ( ) -> setNotification ( $ notification , $ enable ) ; } Auth :: user ( ) -> save ( ) ; return redirect ( ) -> back ( ) -> withStatus ( trans ( 'mustard::account.notifications_changed' ) ) ; }
Change account notification settings.

@return \Illuminate\Http\RedirectResponse
Change account notification settings .