jeroendesloovere / vcard-bundle

A Symfony2 bundle for creating vCards.
MIT License
16 stars 5 forks source link

Using it for Laravel, any extra steps? #3

Open ziming opened 7 years ago

ziming commented 7 years ago

Hi,

I read that it can be used for laravel too but other than composer require what are the extra steps?

The instruction below is for symfony, for laravel 5.5 what do I do?

public function registerBundles()
{
    $bundles = array(
        // ...,
        new JeroenDesloovere\Bundle\VCardBundle\JeroenDesloovereVCardBundle()
    );
}
jeroendesloovere commented 7 years ago

I'm not sure (because I'm not a laravel user), but can try adding the following in app/providers.php: $app->register(new \JeroenDesloovere\Bundle\VCardBundle\JeroenDesloovereVCardBundle());

ziming commented 7 years ago

Ah okay. Thought you know cause in your vcard repo you wrote

Usage in for example: Laravel

return Response::make(
    $this->vcard->getOutput(),
    200,
    $this->vcard->getHeaders(true)
);