From: Vincent Vanwaelscappel Date: Wed, 16 Feb 2022 17:33:31 +0000 (+0100) Subject: wip #5108 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b683dfc475fa5cbbad5322df14dd83bb533df0fd;p=odl.git wip #5108 @0.25 --- diff --git a/app/Http/Controllers/Admin/ToolsController.php b/app/Http/Controllers/Admin/ToolsController.php index 43e7eca..820d148 100644 --- a/app/Http/Controllers/Admin/ToolsController.php +++ b/app/Http/Controllers/Admin/ToolsController.php @@ -5,13 +5,16 @@ namespace App\Http\Controllers\Admin; use App\Http\Controllers\Tools\Compile; use App\Http\Controllers\Tools\FluidbookPreview; use App\Http\Controllers\Tools\PackageDownload; +use App\Models\Asset; -class ToolsController { +class ToolsController +{ use FluidbookPreview; use PackageDownload; use Compile; - public function index($tool, $args = '') { + public function index($tool, $args = '') + { if (!$args) { $args = []; @@ -24,4 +27,14 @@ class ToolsController { } return $this->$tool($args); } + + public function assetsdates() + { + response()->header('Content-Type', 'application/json'); + $res = []; + foreach (Asset::all() as $item) { + $res[$item->id] = ['update' => $item->updated_at]; + } + return json_encode($res); + } }