Skip to content

Commit

Permalink
5.* instead of 5.0
Browse files Browse the repository at this point in the history
closes #16

provides compatibility with 5.1, 5.2 etc.
  • Loading branch information
Mulkave committed Dec 23, 2015
1 parent 29068f4 commit c177173
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) <2014> <vinelab | mahmoud@vinelab.com>
Copyright (c) 2015 Vinelab <dev@vinelab.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# URL Shortener PHP Package

[![Latest Stable Version](https://poser.pugx.org/vinelab/url-shortener/v/stable)](https://packagist.org/packages/vinelab/url-shortener)
[![Latest Unstable Version](https://poser.pugx.org/vinelab/url-shortener/v/unstable)](https://packagist.org/packages/vinelab/url-shortener)
[![Total Downloads](https://poser.pugx.org/vinelab/url-shortener/downloads)](https://packagist.org/packages/vinelab/url-shortener)
[![Latest Stable Version](https://poser.pugx.org/vinelab/url-shortener/v/stable)](https://packagist.org/packages/vinelab/url-shortener)
[![Latest Unstable Version](https://poser.pugx.org/vinelab/url-shortener/v/unstable)](https://packagist.org/packages/vinelab/url-shortener)
[![Total Downloads](https://poser.pugx.org/vinelab/url-shortener/downloads)](https://packagist.org/packages/vinelab/url-shortener)
[![Build Status](https://travis-ci.org/Vinelab/url-shortener.svg)](https://travis-ci.org/Vinelab/url-shortener)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Vinelab/url-shortener/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Vinelab/url-shortener/?branch=master)
[![License](https://poser.pugx.org/vinelab/url-shortener/license)](https://packagist.org/packages/vinelab/url-shortener)
Expand All @@ -27,7 +27,7 @@ The recommended way to install this package is via `Composer`.

A. Run this composer command:

```bash
```bash
composer require vinelab/url-shortener:*
```

Expand Down Expand Up @@ -64,7 +64,7 @@ The service provider will automatically alias the `Vinelab\UrlShortener\Shorten`

.2. Publish the configuration file:

```bash
```bash
php artisan vendor:publish --provider ='Vinelab\UrlShortener\UrlShortenerServiceProvider'
```

Expand All @@ -86,20 +86,20 @@ php artisan vendor:publish --provider ='Vinelab\UrlShortener\UrlShortenerService
```


Note: It's very recommended to not add your token (any sensetive data) to the config file instead reference it to a `.env` variable.
Note: It's very recommended to not add your token (any sensetive data) to the config file instead reference it to a `.env` variable.

And to do so:

1. replace the `'token' => 'YOUR-TOKEN-HERE',` with `'token' => env('BITLY_TOKEN'),`


2. open your `.env` file and add the token variable there with the token value: `BITLY_TOKEN=YOUR-TOKEN-HERE`.
2. open your `.env` file and add the token variable there with the token value: `BITLY_TOKEN=YOUR-TOKEN-HERE`.


3. add the variable `BITLY_TOKEN=` to the `.env.example` for other developers.



## Usage

##### With Laravel:
Expand All @@ -109,7 +109,7 @@ The easiest way is to use it is by the `Shorten` facade.
```php
$long_url = 'http://testing.tst/something/12345/something-else/54321';

$short_url = Shorten\Shorten::url($long_url); // returns the short version of the long_url as a string
$short_url = Shorten\Shorten::url($long_url); // returns the short version of the long_url as a string
```


Expand Down Expand Up @@ -144,13 +144,13 @@ check the `Bitly` driver `Vinelab\UrlShortener\Drivers\Bitly` class.
[On Github](https://github.com/Vinelab/url-shortener/issues)



## Security

If you discover any security related issues, please email mahmoud@vinelab.com instead of using the issue tracker.
If you discover any security related issues, please email abed.halawi@vinelab.com instead of using the issue tracker.

## Credits

- [Abed Halawi](https://github.com/Mulkave)
- [Mahmoud Zalt](https://github.com/Mahmoudz)
- [All Contributors](../../contributors)

Expand Down
16 changes: 9 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
"URL Shortener",
"bitly",
"Bit.ly",
"Owly",
"Ow.ly",
"Googl",
"Goo.gl",
"Laravel"
],
"authors": [
{
"name": "Abed Halawi",
"email": "abed.halawi@vinelab.com",
"homepage": "http://about.me/abedhalawi",
"role": "Tech Lead"
},
{
"name": "Mahmoud Zalt",
"email": "inbox@mahmoudzalt.com",
Expand All @@ -25,9 +27,9 @@
],
"require": {
"php": ">=5.4.0",
"illuminate/support": "5.0.*",
"illuminate/config": "~5.0",
"symfony/finder": "~2.6",
"illuminate/support": "5.*",
"illuminate/config": "5.*",
"symfony/finder": "~2.7",
"Vinelab/http": "1.2.*"
},
"require-dev": {
Expand Down

0 comments on commit c177173

Please sign in to comment.