radfusion/app/Http/Controllers/HashedStudyControllerBase.php
2025-01-14 13:22:02 +06:00

19 lines
331 B
PHP

<?php
namespace App\Http\Controllers;
use App\Models\Study;
class HashedStudyControllerBase extends HashidControllerBase
{
protected ?Study $study = null;
protected function getStudy(): Study
{
$this->decodeKeys();
$this->study = Study::findOrFail($this->key);
return $this->study;
}
}