init
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace Stemcell\Customer\Controller\Sms;
|
||||
|
||||
use Magento\Framework\App\Action\HttpGetActionInterface;
|
||||
use Magento\Framework\Controller\Result\JsonFactory as ResultJsonFactory;
|
||||
use Magento\SalesSequence\Model\Manager;
|
||||
use Stemcell\Sales\Helper\Data;
|
||||
use Magento\Framework\App\Response;
|
||||
|
||||
class Test implements HttpGetActionInterface
|
||||
{
|
||||
protected Data $data;
|
||||
|
||||
protected ResultJsonFactory $resultJsonFactory;
|
||||
protected Manager $sequenceManager;
|
||||
|
||||
public function __construct(
|
||||
Data $data,
|
||||
ResultJsonFactory $resultJsonFactory,
|
||||
Manager $sequenceManager
|
||||
) {
|
||||
$this->data = $data;
|
||||
$this->resultJsonFactory = $resultJsonFactory;
|
||||
$this->sequenceManager = $sequenceManager;
|
||||
}
|
||||
|
||||
public function execute()
|
||||
{
|
||||
$sequence = $this->sequenceManager->getSequence('order', 1);
|
||||
return $this->resultJsonFactory->create()->setData(['data'=>$sequence->getNextValue()]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user