mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 20:44:19 +00:00
33 lines
924 B
PHP
33 lines
924 B
PHP
<?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());
|
|
}
|
|
}
|
|
}
|