transition

This commit is contained in:
2024-08-14 22:04:34 +03:00
parent 1ab3f678b7
commit 1f3ebafe69
50 changed files with 924 additions and 172 deletions
+28 -6
View File
@@ -21,14 +21,36 @@ class HomeController extends Controller
{
}
public function home(): View
public function home(Request $request): View
{
$urlParams = $request->all();
$users = $this->accountService->all();
$sort = data_get($urlParams, "sort") ?? "-_sys.updatedAt";
$filter = data_get($urlParams, "filter") ?? [];
$arguments = array_merge([
"schema_in" => $this->accountService->currentReadableSchemas(),
"status_in" => ["draft", "published"]
], $filter);
$limit = 10;
$graph = $this->query
->filter($arguments)
->limit($limit)
->childrenDepth(1)
->parentsDepth(0)
->sort($sort)
->run();
return view("lucent::home", [
"users" => $users,
"records" => $graph->getRootRecords(),
"graph" => toArray($graph),
"modalUrl" => $request->fullUrl(),
]);
return $this->svelte->render(
layout: "channel",
view: "homeIndex",
title: "Records",
);
}
public function records(Request $request): Response