This commit is contained in:
Dillon
2023-09-21 20:16:22 +08:00
parent 0cdff7c544
commit 90b85c0df1
7 changed files with 47 additions and 47 deletions
@@ -0,0 +1,32 @@
<?php
namespace App\Classes\Modules\HelpMenu\Processors;
use App\Classes\Modules\HelpMenu\Services\FetchesHelpMenuQuestion;
use ErrorException;
use Illuminate\Http\Request;
class FetchFirstQuestionQAProcessor
{
/** @var FetchesHelpMenuQuestion */
private $fetchesHelpMenuQuestion;
/**
* FetchFirstQuestionQAProcessor constructor.
* @param FetchesHelpMenuQuestion $fetchesHelpMenuQuestion
*/
public function __construct(FetchesHelpMenuQuestion $fetchesHelpMenuQuestion)
{
$this->fetchesHelpMenuQuestion = $fetchesHelpMenuQuestion;
}
public function execute(Request $request){
try {
$query = $this->fetchesHelpMenuQuestion->execute(['questionnaire_set_id' => 1]);
return $query;
} catch (\Exception $exception){
throw new ErrorException($exception->getMessage(), $exception->getCode());
}
}
}