|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Bantenprov\VueBlog; |
|
4
|
|
|
|
|
5
|
|
|
use Illuminate\Support\ServiceProvider; |
|
6
|
|
|
use Illuminate\Foundation\AliasLoader; |
|
7
|
|
|
use Collective\Html\HtmlServiceProvider; |
|
8
|
|
|
|
|
9
|
|
|
class BlogServiceProvider extends ServiceProvider |
|
10
|
|
|
{ |
|
11
|
|
|
/** |
|
12
|
|
|
* Bootstrap the application services. |
|
13
|
|
|
* |
|
14
|
|
|
* @return void |
|
15
|
|
|
*/ |
|
16
|
|
|
public function boot() |
|
17
|
|
|
{ |
|
18
|
|
|
if(!$this->app->routesAreCached()){ |
|
|
|
|
|
|
19
|
|
|
$this->app->router->group( |
|
|
|
|
|
|
20
|
|
|
[ |
|
21
|
|
|
'namespace' => 'Bantenprov\VueBlog\Controllers', |
|
22
|
|
|
'prefix' => config('package.routing.prefix'), |
|
23
|
|
|
// 'middleware' => config('package.routing.middleware') |
|
|
|
|
|
|
24
|
|
|
] |
|
25
|
|
|
, function () |
|
26
|
|
|
{ |
|
27
|
|
|
require_once 'routes.php'; |
|
28
|
|
|
}); |
|
29
|
|
|
} |
|
30
|
|
|
|
|
31
|
|
|
//$this->loadRoutesFrom(__DIR__.'/routes.php'); |
|
|
|
|
|
|
32
|
|
|
$this->loadMigrationsFrom(__DIR__.'/migrations'); |
|
33
|
|
|
$this->loadViewsFrom(__DIR__.'/resources/views', 'view'); |
|
34
|
|
|
|
|
35
|
|
|
|
|
36
|
|
|
$this->app->register(HtmlServiceProvider::class); |
|
37
|
|
|
AliasLoader::getInstance(['Form'=>'\Collective\Html\FormFacade']); |
|
38
|
|
|
$this->viewHandle(); |
|
39
|
|
|
$this->migrationHandle(); |
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* Register the application services. |
|
44
|
|
|
* |
|
45
|
|
|
* @return void |
|
46
|
|
|
*/ |
|
47
|
|
|
public function register() |
|
48
|
|
|
{ |
|
49
|
|
|
// |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
protected function viewHandle() |
|
53
|
|
|
{ |
|
54
|
|
|
$packageViewsPath = __DIR__.'/resources/assets/js/components'; |
|
55
|
|
|
$this->publishes([ |
|
56
|
|
|
$packageViewsPath => resource_path('assets/js/components'), |
|
57
|
|
|
], 'vue_assets'); |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
protected function migrationHandle() |
|
61
|
|
|
{ |
|
62
|
|
|
$packageMigrationsPath = __DIR__.'/migrations'; |
|
63
|
|
|
$this->publishes([ |
|
64
|
|
|
$packageMigrationsPath => database_path('migrations') |
|
65
|
|
|
], 'vue_migrations'); |
|
66
|
|
|
} |
|
67
|
|
|
} |
|
68
|
|
|
|
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.