Help Menu prototype v0.1

This commit is contained in:
Dillon
2023-05-04 15:19:04 +08:00
parent cd3e955f3e
commit 5b00b7b45f
40 changed files with 1732 additions and 5 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 FetchFirstHelpMenuQuestionProcessor
{
/** @var FetchesHelpMenuQuestion */
private $fetchesHelpMenuQuestion;
/**
* FetchFirstHelpMenuQuestionProcessor 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());
}
}
}