]> _ Git - odl.git/commitdiff
wip #5108 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 16 Feb 2022 17:33:31 +0000 (18:33 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 16 Feb 2022 17:33:31 +0000 (18:33 +0100)
app/Http/Controllers/Admin/ToolsController.php

index 43e7eca723d520be351bcc3f27f1796b03163e54..820d1488843d1368f64b6b33cb8f9548a20140a3 100644 (file)
@@ -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);
+    }
 }