@@ -27,50 +27,47 @@ public function boot()
27
27
Route::middlewareGroup ('telescope ' , config ('telescope.middleware ' , []));
28
28
29
29
$ this ->registerRoutes ();
30
+ $ this ->registerResources ();
30
31
$ this ->registerMigrations ();
31
32
$ this ->registerPublishing ();
32
33
33
34
Telescope::start ($ this ->app );
34
35
Telescope::listenForStorageOpportunities ($ this ->app );
35
-
36
- $ this ->loadViewsFrom (
37
- __DIR__ .'/../resources/views ' , 'telescope '
38
- );
39
36
}
40
37
41
38
/**
42
39
* Register the package routes.
43
40
*
44
41
* @return void
45
42
*/
46
- private function registerRoutes ()
43
+ protected function registerRoutes ()
47
44
{
48
- Route::group ($ this ->routeConfiguration (), function () {
49
- $ this ->loadRoutesFrom (__DIR__ .'/Http/routes.php ' );
45
+ Route::group ([
46
+ 'domain ' => config ('telescope.domain ' , null ),
47
+ 'namespace ' => 'Laravel\Telescope\Http\Controllers ' ,
48
+ 'prefix ' => config ('telescope.path ' ),
49
+ 'middleware ' => 'telescope ' ,
50
+ ], function () {
51
+ $ this ->loadRoutesFrom (__DIR__ .'/../routes/web.php ' );
50
52
});
51
53
}
52
54
53
55
/**
54
- * Get the Telescope route group configuration array .
56
+ * Register the Telescope resources .
55
57
*
56
- * @return array
58
+ * @return void
57
59
*/
58
- private function routeConfiguration ()
60
+ protected function registerResources ()
59
61
{
60
- return [
61
- 'domain ' => config ('telescope.domain ' , null ),
62
- 'namespace ' => 'Laravel\Telescope\Http\Controllers ' ,
63
- 'prefix ' => config ('telescope.path ' ),
64
- 'middleware ' => 'telescope ' ,
65
- ];
62
+ $ this ->loadViewsFrom (__DIR__ .'/../resources/views ' , 'telescope ' );
66
63
}
67
64
68
65
/**
69
66
* Register the package's migrations.
70
67
*
71
68
* @return void
72
69
*/
73
- private function registerMigrations ()
70
+ protected function registerMigrations ()
74
71
{
75
72
if ($ this ->app ->runningInConsole () && $ this ->shouldMigrate ()) {
76
73
$ this ->loadMigrationsFrom (__DIR__ .'/../database/migrations ' );
@@ -82,7 +79,7 @@ private function registerMigrations()
82
79
*
83
80
* @return void
84
81
*/
85
- private function registerPublishing ()
82
+ protected function registerPublishing ()
86
83
{
87
84
if ($ this ->app ->runningInConsole ()) {
88
85
$ this ->publishes ([
0 commit comments