LoginSignup
0
0

More than 3 years have passed since last update.

Laravel/uiのインストールの注意

Posted at

自分が出会ったエラーと解決法を書いています。

環境

laravel:7.30.2
php:7.4

※ php8だとlaravel/uiは使えない
laravel8ならjetstream??使うのがいいのかな?

laravel/ui インストールでエラー

composer require laravel/uiとコマンドを叩いた際に下記のエラーが出た。

Installation failed, reverting ./composer.json to its original content.

どうやらバージョンの重複が...という感じらしくこれを回避するコマンドを叩かないといけない。

composer require laravel/ui:3.*

自分はcomposer require laravel/ui:2.*で動いた。

web.phpでのエラー

インストールはできたけどweb.phpで新たなエラーが出ていた。
原因はlaravel/uiをインストールしたときにweb.phpにAuth::routes();が生成されるが、namespaceの問題みたい。
てことで、use Illuminate\Support\Facades\Auth;を記述すると解決する。

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