diff --git a/app/Http/Controllers/HashidControllerBase.php b/app/Http/Controllers/HashidControllerBase.php new file mode 100644 index 0000000..29e5bae --- /dev/null +++ b/app/Http/Controllers/HashidControllerBase.php @@ -0,0 +1,33 @@ +hashid = request('hashid'); + $this->decodeHashid($this->hashid); + } + + protected function decodeHashId(?string $hashid): void + { + if (! blank($hashid)) { + try { + $this->key = unhash_it($hashid); + } catch (Throwable $exc) { + gobble($exc); + } + } + + abort_if($this->key === null, 404); + } +} diff --git a/app/Http/Controllers/Staff/StudiesController.php b/app/Http/Controllers/Staff/StudiesController.php new file mode 100644 index 0000000..88fb0b0 --- /dev/null +++ b/app/Http/Controllers/Staff/StudiesController.php @@ -0,0 +1,12 @@ +