helpers refactoring

This commit is contained in:
Peter Papp
2021-03-31 08:27:28 +02:00
parent 6ac6528243
commit a8fa3694be
30 changed files with 85 additions and 211 deletions

View File

@@ -168,7 +168,7 @@ class User extends Authenticatable
*/
public function record_upload($file_size)
{
$now = Carbon::now();
$now = now();
$record = Traffic::whereYear('created_at', '=', $now->year)
->whereMonth('created_at', '=', $now->month)
@@ -188,7 +188,7 @@ class User extends Authenticatable
*/
public function record_download($file_size)
{
$now = Carbon::now();
$now = now();
$record = Traffic::whereYear('created_at', '=', $now->year)
->whereMonth('created_at', '=', $now->month)