Skip to content

Commit e00ebec

Browse files
committed
added laravel service provider
1 parent a55db99 commit e00ebec

File tree

3 files changed

+39
-6
lines changed

3 files changed

+39
-6
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
8383

8484
[ico-version]: https://img.shields.io/packagist/v/bhutanio/bencode.svg?style=flat-square
8585
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
86-
[ico-travis]: https://img.shields.io/travis/rchouinard/bencode.svg?style=flat-square
87-
[ico-coveralls]: https://img.shields.io/coveralls/rchouinard/bencode.svg?style=flat-square
86+
[ico-travis]: https://img.shields.io/travis/bhutanio/bencode.svg?style=flat-square
87+
[ico-coveralls]: https://img.shields.io/coveralls/bhutanio/bencode.svg?style=flat-square
8888
[ico-code-quality]: https://img.shields.io/sensiolabs/i/c444c99a-2870-459b-9268-13c96166e8f7.svg?style=flat-square
8989
[ico-downloads]: https://img.shields.io/packagist/dt/bhutanio/bencode.svg?style=flat-square
9090

9191
[link-packagist]: https://packagist.org/packages/bhutanio/bencode
92-
[link-travis]: https://travis-ci.org/rchouinard/bencode
93-
[link-coveralls]: https://coveralls.io/r/rchouinard/bencode
92+
[link-travis]: https://travis-ci.org/bhutanio/bencode
93+
[link-coveralls]: https://coveralls.io/r/bhutanio/bencode
9494
[link-code-quality]: https://insight.sensiolabs.com/projects/c444c99a-2870-459b-9268-13c96166e8f7
9595
[link-downloads]: https://packagist.org/packages/bhutanio/bencode
9696
[link-author]: https://github.com/rchouinard
97-
[link-contributors]: https://github.com/rchouinard/bencode/graphs/contributors
97+
[link-contributors]: https://github.com/bhutanio/bencode/graphs/contributors
9898

composer.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
}
1414
],
1515
"require": {
16-
"php": ">=7.0.0"
16+
"php": ">=7.0.0",
17+
"illuminate/support": "5.*"
1718
},
1819
"require-dev": {
1920
"phpunit/phpunit": "6.*"
@@ -22,5 +23,12 @@
2223
"psr-4": {
2324
"Bhutanio\\Bencode\\": "src/"
2425
}
26+
},
27+
"extra": {
28+
"laravel": {
29+
"providers": [
30+
"Bhutanio\\Bencode\\BencodeServiceProvider"
31+
]
32+
}
2533
}
2634
}

src/BencodeServiceProvider.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
namespace Bhutanio\Laravel;
4+
5+
6+
use Bhutanio\Bencode\Bencode;
7+
use Illuminate\Support\ServiceProvider;
8+
9+
class BencodeServiceProvider extends ServiceProvider
10+
{
11+
/**
12+
* Bootstrap any application services.
13+
*/
14+
public function boot()
15+
{
16+
$this->app->singleton(Bencode::class);
17+
}
18+
19+
/**
20+
* Register the service provider.
21+
*/
22+
public function register()
23+
{
24+
}
25+
}

0 commit comments

Comments
 (0)