Update SecuritySettings, add devices to security view

This commit is contained in:
Daniel Supernault 2019-04-11 14:33:53 -06:00
parent 00c47be203
commit 3595552f02
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -8,6 +8,7 @@ use App\Media;
use App\Profile; use App\Profile;
use App\User; use App\User;
use App\UserFilter; use App\UserFilter;
use App\UserDevice;
use App\Util\Lexer\PrettyNumber; use App\Util\Lexer\PrettyNumber;
use Auth; use Auth;
use DB; use DB;
@ -27,7 +28,12 @@ trait SecuritySettings
->limit(20) ->limit(20)
->get(); ->get();
return view('settings.security', compact('activity', 'user')); $devices = UserDevice::whereUserId($user->id)
->orderBy('created_at', 'desc')
->limit(5)
->get();
return view('settings.security', compact('activity', 'user', 'devices'));
} }
public function securityTwoFactorSetup(Request $request) public function securityTwoFactorSetup(Request $request)