Skip to content

Instantly share code, notes, and snippets.

@j0um
j0um / CurrentProduct.php
Created January 14, 2020 16:09
Fetching a product in Magento 2 admin backend. This is an alternative to the deprecated Registry class.
namespace Vendor\CustomModule\Model\Provider;
use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\Exception\NoSuchEntityException;
/**
* Class Product
@j0um
j0um / MailServiceProvider.php
Last active July 17, 2020 10:40
Adding support for Mailgun's parameters to Laravel
# app/Providers/MailServiceProvider.php
<?php
namespace App\Providers;
use App\Mail\TransportManager;
/**
* Class MailServiceProvider