PHP code example of ruvents / api-bundle

1. Go to this page and download the library: Download ruvents/api-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ruvents / api-bundle example snippets




namespace AppBundle\Controller\Api;

use Ruwork\ApiBundle\Annotations as Api;
use Ruwork\ApiBundle\Controller\AbstractApiController;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;

/**
 * @Route("/test")
 */
class TestController extends AbstractApiController
{
    /**
     * @Method("GET")
     * @Route("")
     * @Api\Doc("Test method",