LoginSignup
0
0
個人開発エンジニア応援 - 個人開発の成果や知見を共有しよう!-

telescopeの導入とERROR There are no commands defined in the "telescope" namespace.

Posted at

LaravelにTelescopeを導入したい。

https://laravel.com/docs/9.x/telescope
基本的にこの通りにやればいいのだが、記載されていないエラーがでた。

手順

いつも通りに、/var/www に移動。

Laravel
composer require laravel/telescope --dev
Laravel
php artisan telescope:install

// ここでエラーでる
ERROR There are no commands defined in the “telescope” namespace.

ので
config/app.phpの’providersに下記を追加

config/app.php
'providers' => [
// ・・・
Laravel\Telescope\TelescopeServiceProvider::class,
]

その後、再度

Laravel
php artisan telescope:install

とすると

Publishing Telescope Service Provider…
Publishing Telescope Assets…
Publishing Telescope Configuration…
Telescope scaffolding installed successfully.

と成功メッセージが表示される。

最後にマイグレーションも忘れずに

Laravel
php artisan migrate

これでつかえるようになります。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0