Skip to content

Instantly share code, notes, and snippets.

@michielgerritsen
Last active March 26, 2018 08:13
Show Gist options
  • Save michielgerritsen/3c16c70d10b7fd34aa0d323c26f9400f to your computer and use it in GitHub Desktop.
Save michielgerritsen/3c16c70d10b7fd34aa0d323c26f9400f to your computer and use it in GitHub Desktop.
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class MagentoServiceProvider extends ServiceProvider
{
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register services.
*
* @return void
*/
public function register()
{
$this->app->bind('Magento', function () {
require_once '../../path-to-your-magento-installation/app/Mage.php';
return \Mage::app();
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment