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 = [];
}
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);
+ }
}