Entity Manager - mitchellvanw/laravel-doctrine GitHub Wiki

One option is by using the EntityManager facade (or service locator). Other ways are by using the IoC container or constructor injection.

EntityManager::flush();
$entityManager = App::make('Doctrine\ORM\EntityManagerInterface');
use Doctrine\ORM\EntityManagerInterface

class ExampleController extends Controller
{
    private $entityManager;

    public function __construct(EntityManagerInterface $entityManager)
    {
        $this->entityManager = $entityManager;
    }
}