@extends('admin.master') @section('title', trans('general.dashboard')) @section('content')

{{ trans('general.dashboard') }}

{{ trans('admin.index.total-textures') }} {{ App\Models\Texture::count() }}
{{ trans('admin.index.disk-usage') }} sum('size') ?: 0; ?> {{ $size > 1024 ? round($size / 1024, 1)."MB" : $size."KB" }}

{{ trans('admin.index.overview') }}

@endsection @section('script') timestamp; $data = []; $labels = []; // Prepare data for the graph for ($i = 6; $i >= 0; $i--) { $time = Carbon\Carbon::createFromTimestamp($today - $i * 86400); $labels[] = $time->format('m-d'); $data['user_register'][] = App\Models\User::like('register_at', $time->toDateString())->count(); $data['texture_upload'][] = App\Models\Texture::like('upload_at', $time->toDateString())->count(); } ?> @endsection