Download the PHP package jgrossi/petty without Composer

On this page you can find all versions of the php package jgrossi/petty. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package petty

Petty URL Shortener

Have your own URL shortener, using your own domain, with easy.

Petty is a small PHP app (made with Laravel) that allows you to host your own URL shortener. It's clean and easy to use and install, allowing you to have your own shortener in a few minutes.

For now it does not support statistics, that is made initially by Bitly. We're working on new features and in the future Petty will do all the job. Please, contribute with the project and suggest new features.

How it works

Petty shorts the original URL generating new URLs like http://doma.in/m9. This URL redirects to a Bitly shorten URL (where, if you want, you can get more statistics) and after to the original URL.

The app uses your own domain, and the generated URLs are customized for you. All generated URL are stored in a Sqlite database and generated using your Laravel APP_KEY, so using http://doma.in/m9 as example, the m9 is generated only for you, and represents a row stored in your local database. The generated hash (m9) has at least 2 chars length.

Installing

The easier and recommended way to install Petty is using the create-project command in Composer:

You can also clone this repo and run composer install to get all PHP dependencies, but this way you have to generate Laravel application key php artisan key:generate by hand. The recommended installation is using create-project that does everything Petty needs to run.

After Petty installed you have only to run your webserver in the /public folder and access the URL. Petty will have everything working, including database.

Attention! Your web root (virtual host) will be my-shortener/public!

Usage

As Petty for now does not provide more statistics (only clicks) every short URL has your Bitly correspondent. So before use your own URL shortener you should create a free Bitly account and set your username and password to the .env file. More information in the Configuration section below.

Configuration

All configuration is made using .env. You'll have a .env.sample that was copied to the .env file when you've installed Petty. You have to customize this file with your personal data, URL, name, avatar image, and Bitly username and password.

Running your own assets

By default all css and js files are stored in public folder minified and merged. If you want to customize your assets files, like changing css or even js I suggest to install bower packages and elixir (gulp). This will take a little:

Bower will install Bootstrap, Clipboard.js, FontAwesome, jQuery and jQuery-UJS (by Ruby on Rails). NPM will install gulp and all Elixir dependencies.

After that you will have 3 more directories in your folder root: vendor (PHP packages by Composer), bower_components (packages by Bower) and node_modules (packages by Node JS). The original css and js files are stored in resources/assets folder.

Running gulp watch --production will allow you to change the resources/assets/css/*.less and resources/assets/js/*.js files. So, after that gulp will merge everything and minify the result, storing them in public/css/styles.css and public/js/scripts.js, respectively.

You can also change and customize the views (HTML), change colors, etc. Bee free to make Petty like you want.

Contributing

Thank you for considering contributing to the Petty URL Shortener! Just made your changes, suggest and create a pull request to the dev branch. Any question just ask in issues section. Any help or suggestion is welcome!

Petty has much to grow. This is the first release and that's the minimum to a URL shortener works. So, please send features suggestions, statistics suggestions and what you think will be good to the package.

Licence

MIT License © Junior Grossi


All versions of petty with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
laravel/framework Version 5.2.*
mremi/url-shortener Version ~1.0.0
hashids/hashids Version ~1.0.0
laravelcollective/html Version ~5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jgrossi/petty contains the following files

Loading the files please wait ....