mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
33 lines
936 B
PHP
33 lines
936 B
PHP
<?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' => $request->route('set_id')]);
|
|
return $query;
|
|
} catch (\Exception $exception){
|
|
throw new ErrorException($exception->getMessage(), $exception->getCode());
|
|
}
|
|
}
|
|
}
|