jaxyeh / url-shortener-bundle
A basic implementation of URL Shortener Bundle for Symfony2
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- hashids/hashids: 1.0.4
- symfony/symfony: >=2.6
This package is not auto-updated.
Last update: 2024-04-23 14:06:07 UTC
README
A basic implementation of URL Shortener Bundle for Symfony2
Installation
Step 1: Download the Bundle
Add the bundle in your composer.json :
"require": { "jaxyeh/url-shortener-bundle": "dev-master" }
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding the following line in the app/AppKernel.php
file of your project:
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Jaxyeh\UrlShortenerBundle\JaxyehUrlShortenerBundle(), ); // ... } // ... }
Step 3: Set Configuration
Add the following paramters to your configuration file:
parameters: jaxyeh_url.hashids.salt: mysalt jaxyeh_url.hashids.min_length: 5
Step 4: Generate Database Schema
Finally, you have to generate your database schema with this Symfony2 command:
php app/console doctrine:schema:update --force
License
This script is available under the MIT license.