PHPackages                             fourcoders/latch-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. fourcoders/latch-bundle

ActiveSymfony-bundle[Security](/categories/security)

fourcoders/latch-bundle
=======================

Easy integration of Latch in your symfony2 project.

v2.0.0(11y ago)10242MITPHPPHP &gt;=5.4.0

Since Apr 24Pushed 11y ago5 watchersCompare

[ Source](https://github.com/fourcoders/LatchBundle)[ Packagist](https://packagist.org/packages/fourcoders/latch-bundle)[ RSS](/packages/fourcoders-latch-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

[![SensioLabsInsight](https://camo.githubusercontent.com/856913e8eb36e3d1dd61472700bad83dea8c2ffb0ea711d3e988b4c055ba0023/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f62336235373238382d343365322d343165632d393231302d3964393237303731663565622f6269672e706e67)](https://insight.sensiolabs.com/projects/b3b57288-43e2-41ec-9210-9d927071f5eb)

[![Build Status](https://camo.githubusercontent.com/a0c128e779542938d2c1d17dbbb3f41f2e12e129342e984b35b5f98072fe3ab2/68747470733a2f2f7472617669732d63692e6f72672f666f7572636f646572732f4c6174636842756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fourcoders/LatchBundle) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/df2e645f254c750d51e4ce6d1ba79b03f2882bb237597b200a65453fac02b055/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f666f7572636f646572732f4c6174636842756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/fourcoders/LatchBundle/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/8646a4013af0f8731861cc56ac3272672297b12db30bf24d8102dc54a5edd244/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f666f7572636f646572732f4c6174636842756e646c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/fourcoders/LatchBundle/?branch=master)

LatchBundle
===========

[](#latchbundle)

Easy integration of Latch in your symfony2 project. You can visit the official website:

Prerequisites
-------------

[](#prerequisites)

### Translations

[](#translations)

If you wish to use default texts provided in this bundle, you have to make sure you have translator enabled in your config.

```
# app/config/config.yml

framework:
    translator: ~
```

For more information about translations, check [Symfony documentation](http://symfony.com/doc/current/book/translation.html).

Installation
------------

[](#installation)

1. [Download LatchBundle using composer](#step-1-download-latchbundle-using-composer)
2. [Enable the Bundle](#step-2-enable-the-bundle)
3. [Update your User class](#step-3-update-your-user-class)
4. [Configure the LatchBundle](#step-4-configure-the-latchbundle)
5. [Import LatchBundle routing](#step-5-import-latchbundle-routing-files)
6. [Update your database schema](#step-6-update-your-database-schema)
7. [Setup your latch operations](#step-7-setup-your-latch-operations)

### Step 1: Download LatchBundle using composer

[](#step-1-download-latchbundle-using-composer)

Add LatchBundle in your composer.json.

First option: You can install the official [Latch PHP SDK by ElevenPaths](https://github.com/ElevenPaths/latch-sdk-php). [Composer can not load repositories recursively](https://getcomposer.org/doc/faqs/why-can%27t-composer-load-repositories-recursively.md) .You need to add this dependency in your composer.json or You can manage it by satis or toran proxy.

```
{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "elevenpaths/latch-sdk-php",
                "version": "dev-master",
                "source": {
                    "url": "https://github.com/ElevenPaths/latch-sdk-php.git",
                    "type": "git",
                    "reference": "origin/master"
                },
            "autoload": {
                "classmap": ["/"]
                }
            }
        }
    ],
    "require": {
        "elevenPaths/latch-sdk-php": "dev-master",
        "fourcoders/latch-bundle": "dev-master"
    }
}
```

After install libraries, You must put eleven\_paths as a your latch\_driver in your config.yml:

```
# app/config/config.yml
fourcoders_latch:
    latch_app_id: PdHF10WnSDasSINHHZd0n
    latch_app_secret: kH1oqtVlWyWZLKQWIJCAKLodd4XUIgMMLQiwag
    latch_driver: eleven_paths
    latch_redirect: /
    latch_operations: ~
```

Second Option: You can install unofficial [fourcoders/latch-sdk-php](https://github.com/fourcoders/latch-sdk-php). Its very similar to the official Latch PHP SDK by ElevenPaths , however we use composer for managing the dependencies and Guzzle for the HTTP Request.

```
{
    "require": {
        "fourcoders/latch-sdk-php": "dev-master",
        "fourcoders/latch-bundle": "dev-master"
    }
}
```

After install libraries, You must put fourcorders as a your latch\_driver in your config.yml:

```
# app/config/config.yml
fourcoders_latch:
    latch_app_id: PdHF10WnSDasSINHHZd0n
    latch_app_secret: kH1oqtVlWyWZLKQWIJCAKLodd4XUIgMMLQiwag
    latch_driver: fourcoders
    latch_redirect: /
    latch_operations: ~
```

### Step 2: Enable the bundle

[](#step-2-enable-the-bundle)

Enable the bundle in the kernel:

```
