PHP code example of ticketpark / expiring-url-bundle

1. Go to this page and download the library: Download ticketpark/expiring-url-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/ */

    

ticketpark / expiring-url-bundle example snippets




namespace Acme\Bundle\AcmeBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class AcmeController extends Controller
{
    public function fooAction()
    {
        //no need to add the 'expirationHash' parameter when generating urls
        $url = $this->get('router')->generate('expiring_route',
            array('id' => 123)
        );

        // ...
    }
}
 bash
$ php composer.phar update ticketpark/expiring-url-bundle
 php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Ticketpark\ExpiringUrlBundle\TicketparkExpiringUrlBundle(),
        new Ticketpark\FileBundle\TicketparkFileBundle(),
    );
}