Skip to content

Commit cae82a1

Browse files
committed
tele rv2
1 parent 506f789 commit cae82a1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/Providers/AppServiceProvider.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ class AppServiceProvider extends ServiceProvider
1111
*/
1212
public function register(): void
1313
{
14-
// ローカル環境のみTelescopeを登録
14+
// ローカル環境のみTelescopeを登録(class_existsチェック追加)
1515
if ($this->app->environment('local')) {
16-
$this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class);
17-
$this->app->register(\App\Providers\TelescopeServiceProvider::class);
16+
if (class_exists(\Laravel\Telescope\TelescopeServiceProvider::class)) {
17+
$this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class);
18+
$this->app->register(\App\Providers\TelescopeServiceProvider::class);
19+
}
1820
}
1921
}
2022

0 commit comments

Comments
 (0)