Skip to content

Commit 5b17ae4

Browse files
author
bryanadamloh97
committed
Added service provider
1 parent 012bf72 commit 5b17ae4

File tree

4 files changed

+58
-24
lines changed

4 files changed

+58
-24
lines changed

.gitignore

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
1-
/vendor/
2-
node_modules/
3-
npm-debug.log
4-
yarn-error.log
5-
6-
# Laravel 4 specific
7-
bootstrap/compiled.php
8-
app/storage/
9-
10-
# Laravel 5 & Lumen specific
11-
public/storage
12-
public/hot
13-
14-
# Laravel 5 & Lumen specific with changed public path
15-
public_html/storage
16-
public_html/hot
17-
18-
storage/*.key
19-
.env
20-
Homestead.yaml
21-
Homestead.json
22-
/.vagrant
1+
vendor/
2+
.idea/
3+
composer.lock
4+
phpunit.xml
235
.phpunit.result.cache

composer.json

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,38 @@
11
{
22
"name": "codeofdigital/laravel-url-shortener",
33
"description": "Powerful URL shoterning tools for your Laravel projects",
4+
"keywords": [
5+
"laravel",
6+
"lumen",
7+
"url",
8+
"shortener",
9+
"short-url",
10+
"shortening",
11+
"bit.ly"
12+
],
13+
"type": "library",
414
"license": "MIT",
515
"authors": [
616
{
717
"name": "bryan adam loh",
818
"email": "bryanadamloh97@gmail.com"
919
}
1020
],
11-
"require": {},
21+
"require": {
22+
"php": "^7.2",
23+
"guzzlehttp/guzzle": "^6.2",
24+
"guzzlehttp/promises": "^1.0",
25+
"guzzlehttp/psr7": "^1.4",
26+
"illuminate/support": "^5.1 || ^6.0 || ^7.0",
27+
"psr/http-message": "^1.0"
28+
},
29+
"require-dev": {
30+
"illuminate/routing": "^5.1 || ^6.0 || ^7.0",
31+
"phpunit/phpunit": "^7.0"
32+
},
1233
"autoload": {
1334
"psr-4": {
14-
"codeofdigital\\laravel-url-shortener": "src"
35+
"CodeOfDigital\\LaravelUrlShortener\\": "src"
1536
}
1637
}
1738
}

config/url-shortener.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
return [
4+
'default' => env('URL_SHORTENER_DRIVER', 'tiny_url'),
5+
6+
'shorteners' => [
7+
'bit.ly' => [
8+
'driver' => 'bit_ly',
9+
'domain' => env('URL_SHORTENER_PREFIX', 'bit.ly'),
10+
'token' => env('URL_SHORTENER_API_TOKEN'),
11+
]
12+
]
13+
];
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace CodeOfDigital\LaravelUrlShortener;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class UrlShortenerServiceProvider extends ServiceProvider
8+
{
9+
public function boot()
10+
{
11+
$this->mergeConfigFrom(__DIR__.'/../config/url-shortener.php', 'url-shortener');
12+
}
13+
14+
public function register()
15+
{
16+
parent::register(); // TODO: Change the autogenerated stub
17+
}
18+
}

0 commit comments

Comments
 (0)