We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 062a919 commit 84d1699Copy full SHA for 84d1699
src/stubs/cms/core/layout/routes.php
@@ -1,4 +1,21 @@
1
<?php
2
Route::get('/',function(){
3
return view('layout::site.welcome');
4
-})->name('home');
+})->name('home');
5
+/*assets*/
6
+Route::get('/assets/{module}/{type}/{file}', [ function ($module, $type, $file) {
7
+ $module = ucfirst($module);
8
+
9
+ $path = base_path("cms/local/".Cms::getCurrentTheme()."/$module/resources/asserts/$type/$file");
10
11
+ if (\File::exists($path)) {
12
+ //return response()->download($path, "$file");
13
+ if($type == 'js'){
14
+ return response()->file($path, array('Content-Type' => 'application/javascript'));
15
+ }else{
16
+ return response()->file($path, array('Content-Type' => 'text/css'));
17
+ }
18
19
20
+ return response()->json([ ], 404);
21
+}]);
0 commit comments