2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

LaravelでReactを使う準備の私的まとめ

Last updated at Posted at 2020-10-07

#環境

  • laravel 7.27.0

#Reactへの切り替え
まずはlaravel/uiをインストール

composer require laravel/ui:0.*

laravel7からはphp artisan preset reactと入力すると
Command "preset" is not defined.と表示される
laravel7からはpresetコマンドが使えなくなったため。
参考:【解決済み】 Command “preset” is not defined.のエラーを解消する方法

その後npmコマンドを実行

npm install

その後以下コマンドを実行

php artisan ui react

--authオプションを付けるとログイン認証機能もインストールされる

resources/js/components/Example.jsになっていることを確認
#参考

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?