Skip to content

Commit 4d17db8

Browse files
committed
Update to use vendor:pushish tags
1 parent 457cf9b commit 4d17db8

File tree

2 files changed

+54
-60
lines changed

2 files changed

+54
-60
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The service provider does not load on every page load, so it should not slow dow
2525

2626
```php
2727
'providers' => array(
28-
'Conner\Tagging\Providers\TaggingServiceProvider',
28+
\Conner\Tagging\Providers\TaggingServiceProvider::class,
2929
);
3030
```
3131
```bash
+53-59
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,53 @@
1-
<?php namespace Conner\Tagging\Providers;
2-
3-
use Illuminate\Support\ServiceProvider;
4-
use Conner\Tagging\Contracts\TaggingUtility;
5-
use Conner\Tagging\Util;
6-
7-
/**
8-
* Copyright (C) 2014 Robert Conner
9-
*/
10-
class TaggingServiceProvider extends ServiceProvider {
11-
12-
/**
13-
* Indicates if loading of the provider is deferred.
14-
*/
15-
protected $defer = true;
16-
17-
/**
18-
* Bootstrap the application events.
19-
*/
20-
public function boot()
21-
{
22-
$this->publishes([
23-
__DIR__.'/../../config/tagging.php' => config_path('tagging.php'),
24-
__DIR__.'/../../migrations/2014_01_07_073615_create_tagged_table.php' => $this->app->databasePath().('/migrations/2014_01_07_073615_create_tagged_table.php'),
25-
__DIR__.'/../../migrations/2014_01_07_073615_create_tags_table.php' => $this->app->databasePath().('/migrations/2014_01_07_073615_create_tags_table.php'),
26-
]);
27-
}
28-
29-
/**
30-
* Register the service provider.
31-
*
32-
* @return void
33-
*/
34-
public function register()
35-
{
36-
$this->app->singleton(TaggingUtility::class, function () {
37-
return new Util;
38-
});
39-
}
40-
41-
/**
42-
* (non-PHPdoc)
43-
* @see \Illuminate\Support\ServiceProvider::provides()
44-
*/
45-
public function provides()
46-
{
47-
return [TaggingUtility::class];
48-
}
49-
50-
/**
51-
* (non-PHPdoc)
52-
* @see \Illuminate\Support\ServiceProvider::when()
53-
*/
54-
public function when()
55-
{
56-
return array('artisan.start');
57-
}
58-
59-
}
1+
<?php
2+
3+
namespace Conner\Tagging\Providers;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
use Conner\Tagging\Contracts\TaggingUtility;
7+
use Conner\Tagging\Util;
8+
9+
/**
10+
* Copyright (C) 2014 Robert Conner
11+
*/
12+
class TaggingServiceProvider extends ServiceProvider {
13+
14+
/**
15+
* Indicates if loading of the provider is deferred.
16+
*/
17+
protected $defer = true;
18+
19+
/**
20+
* Bootstrap the application events.
21+
*/
22+
public function boot()
23+
{
24+
$this->publishes([
25+
__DIR__.'/../config/tagging.php' => config_path('tagging.php')
26+
], 'config');
27+
28+
$this->publishes([
29+
__DIR__.'/../migrations/' => database_path('migrations')
30+
], 'migrations');
31+
}
32+
33+
/**
34+
* Register the service provider.
35+
*
36+
* @return void
37+
*/
38+
public function register()
39+
{
40+
$this->app->singleton(TaggingUtility::class, function () {
41+
return new Util;
42+
});
43+
}
44+
45+
/**
46+
* (non-PHPdoc)
47+
* @see \Illuminate\Support\ServiceProvider::provides()
48+
*/
49+
public function provides()
50+
{
51+
return [TaggingUtility::class];
52+
}
53+
}

0 commit comments

Comments
 (0)