changes to sms packages and option to create user

This commit is contained in:
Simon Pocrnjič
2025-11-06 21:54:07 +01:00
parent ad8e0d5cee
commit 1395b72ae8
102 changed files with 1386 additions and 319 deletions
+7 -8
View File
@@ -11,8 +11,8 @@ class ExampleChart
public function __construct(LarapexChart $chart)
{
$this->chart = $chart;
}
}
public function build($options = null)
{
$data = \App\Models\ClientCase::query()
@@ -22,20 +22,19 @@ public function build($options = null)
->groupByRaw('EXTRACT(MONTH from created_at)')
->orderByRaw('EXTRACT(MONTH from created_at)')
->get();
$months = $data->pluck('month')->map(
fn($nu)
=> \DateTime::createFromFormat('!m', $nu)->format('F'))->toArray();
fn ($nu) => \DateTime::createFromFormat('!m', $nu)->format('F'))->toArray();
$newCases = $data->pluck('count')->toArray();
return $this->chart->areaChart()
->setTitle('Novi primeri zadnjih šest mesecev.')
->addData('Primeri', $newCases)
//->addData('Completed', [7, 2, 7, 2, 5, 4])
// ->addData('Completed', [7, 2, 7, 2, 5, 4])
->setColors(['#ff6384'])
->setXAxis($months)
->setToolbar(true)
->toVue();
}
}
}