I have created admin form. I want to get shipping carrier list in admin form. How can get it? Like this below image.
Please give me proper suggestion.
Best Answer
You can simply use the \Magento\Shipping\Model\Config\Source\Allmethods.php class which provides a toOptionArray() method to provide the list of all shipping carriers.
Please note that you can give a parameter to this method that, if set to true, will return only the active shipping carriers.
Best Answer
You can simply use the
\Magento\Shipping\Model\Config\Source\Allmethods.php
class which provides atoOptionArray()
method to provide the list of all shipping carriers.Please note that you can give a parameter to this method that, if set to true, will return only the active shipping carriers.