-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb.php
More file actions
executable file
·36 lines (31 loc) · 1.13 KB
/
web.php
File metadata and controls
executable file
·36 lines (31 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
use App\Filament\Pages\Compare;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Controller;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
// Route::get('/', function () {
// return view('welcome');
// });
// route for response with download file
Route::get('/download/{file}', function ($file) {
$p = '/app/public/datasets/'.$file.'/'.$file.'.hgf';
# concat file again to p
$path = storage_path($p);
# console.log($path
// return response()->download($path);
if (file_exists($path)) {
return response()->download($path);
}
return response()->json(['message' => 'File not found!'], 404);
});
Route::get('/compare/{ids}', Compare::class)->name('filament.pages.compare');
Route::get('jupyter/view', [Controller::class, 'view'])->name('jupyter.view');