概要
laravel7でユーザー認証の実装のまとめ
バージョン
- mac Catalina 10.15.5
- PHP: 7.4.6
- laravel: 7.20.0
前提
- larevelでプロジェクトを立ち上げていること。
- データベースとの接続ができていること。
実装手順
認証に必要なテーブルを作成する。
$ php artisan migrate
composerを使ってlarevel/uiをインストールする。
$ composer require laravel/ui
artisanコマンドでを実行する。
$ php artisan ui vue --auth
Vue scaffolding installed successfully.
Please run "npm install && npm run dev" to compile your fresh scaffolding.
Authentication scaffolding generated successfully.
パッケージのインストールとビルドを行う。
$ npm install
$ npm run dev