1. Home
  2. Docs
  3. Integration of Mavryx wit...
  4. Integration of Mavryx wit...
  5. Installation

Installation

Adding Composer repository to the project

Before proceeding to the next steps, you should add the Mavryx repository to your project.

To do this, open the composer.json file and add the following information to the repositories section

{
  "repositories": [{
    "type": "composer",
    "url": "https://satis.mavryx.software"
  }]
}  

Installing required components using Composer

Installation of Mavryx Symfony bundle

To install the bundle, run the following command in the main folder of your application.

  composer require mavryx/mavryx-symfony-template:^1.0

Validate installation

php bin/console config:dump-reference

On the list you should see “MavryxBundle”

At this point, you should have access to the Mavryx\Bundle\Service\MavryxApiService from within Symfony.

<?php

namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Mavryx\Bundle\Service\MavryxApiService;

class SecurityController extends AbstractController
{
    /**
     * @Route("/someaction", name="someaction")
     */
    public function someaction(Request $request,Response $response,MavryxApiService $mavryxApiService): Response
    {
    	$api = $mavryxApiService->api();
    	/**
    	 * 
    	 */
    	
    	
    	return $response;
    }
}
Was this article helpful to you? No Yes

How can we help?