Define accountCount internally instead of as a props

This commit is contained in:
Bubka
2020-11-21 19:41:36 +01:00
parent 1864378c74
commit b4ce39e9d5
4 changed files with 26 additions and 5 deletions

View File

@@ -256,6 +256,18 @@ class TwoFAccountController extends Controller
}
/**
* A simple and light method to get the account count.
*
* @param \App\TwoFAccount $twofaccount
* @return \Illuminate\Http\Response
*/
public function count(Request $request)
{
return response()->json([ 'count' => TwoFAccount::count() ], 200);
}
/**
* Remove the specified resource from storage.
*