diff --git a/app/Http/Controllers/Staff/StudiesController.php b/app/Http/Controllers/Staff/StudiesController.php index 34e98b4..ef8c20d 100644 --- a/app/Http/Controllers/Staff/StudiesController.php +++ b/app/Http/Controllers/Staff/StudiesController.php @@ -19,7 +19,7 @@ public function index() public function details() { $this->decodeKeys(); - $study = Study::findOrFail($this->key); + $study = Study::with(['series', 'details'])->findOrFail($this->key); return view('staff.studies.details', compact('study')); } diff --git a/config/hashids.php b/config/hashids.php index a6424a8..861d425 100644 --- a/config/hashids.php +++ b/config/hashids.php @@ -30,7 +30,7 @@ 'main' => [ 'salt' => 'Nqy+T6emZLbhzW08gaZqWEtgEv/habWV4zWYWREv2wM=', - 'length' => 0, + 'length' => 8, // 'alphabet' => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' ], diff --git a/routes/web.php b/routes/web.php index 031f321..91196c6 100644 --- a/routes/web.php +++ b/routes/web.php @@ -28,7 +28,7 @@ Route::group(['prefix' => '/studies', 'as' => 'studies.'], function () { Route::get('/', [StudiesController::class, 'index'])->name('index'); - Route::get('/details/{id}', [StudiesController::class, 'details'])->name('details'); + Route::get('{hashid}/details', [StudiesController::class, 'details'])->name('details'); }); });