0
0

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 1 year has passed since last update.

Laravel9 + breeze でログイン画面を自動生成する例

Posted at

以下手順を試した結果のレポジトリはこちら
https://github.com/YumaInaura/laravel9-breeze-example

プロジェクトを作成

composer create-project "laravel/laravel=9.*" laravel9-breeze
cd laravel9-breeze

Breezeのインストール

composer require laravel/breeze
php artisan breeze:install

ルートの確認

php artisan route:list

 GET|HEAD  / ...............................................................................................................................
  POST      _ignition/execute-solution ........................ ignition.executeSolution › Spatie\LaravelIgnition › ExecuteSolutionController
  GET|HEAD  _ignition/health-check .................................... ignition.healthCheck › Spatie\LaravelIgnition › HealthCheckController
  POST      _ignition/update-config ................................. ignition.updateConfig › Spatie\LaravelIgnition › UpdateConfigController
  GET|HEAD  api/user ........................................................................................................................
  GET|HEAD  confirm-password ..................................................... password.confirm › Auth\ConfirmablePasswordController@show
  POST      confirm-password ....................................................................... Auth\ConfirmablePasswordController@store
  GET|HEAD  dashboard ............................................................................................................. dashboard
  POST      email/verification-notification .......................... verification.send › Auth\EmailVerificationNotificationController@store
  GET|HEAD  forgot-password ...................................................... password.request › Auth\PasswordResetLinkController@create
  POST      forgot-password ......................................................... password.email › Auth\PasswordResetLinkController@store
  GET|HEAD  login ........................................................................ login › Auth\AuthenticatedSessionController@create
  POST      login ................................................................................. Auth\AuthenticatedSessionController@store
  POST      logout ..................................................................... logout › Auth\AuthenticatedSessionController@destroy
  PUT       password ....................................................................... password.update › Auth\PasswordController@update
  GET|HEAD  profile ................................................................................... profile.edit › ProfileController@edit
  PATCH     profile ............................................................................... profile.update › ProfileController@update
  DELETE    profile ............................................................................. profile.destroy › ProfileController@destroy
  GET|HEAD  register ........................................................................ register › Auth\RegisteredUserController@create
  POST      register .................................................................................... Auth\RegisteredUserController@store
  POST      reset-password ................................................................ password.store › Auth\NewPasswordController@store
  GET|HEAD  reset-password/{token} ....................................................... password.reset › Auth\NewPasswordController@create
  GET|HEAD  sanctum/csrf-cookie ........................................... sanctum.csrf-cookie › Laravel\Sanctum › CsrfCookieController@show
  GET|HEAD  verify-email .............................................. verification.notice › Auth\EmailVerificationPromptController@__invoke
  GET|HEAD  verify-email/{id}/{hash} .............................................. verification.verify › Auth\VerifyEmailController@__invoke

マイグレーション

php artisan migrate

ユーザーを作成

php artisan tinker

> $user = new User;
> $user->name = "ユーザー名";
> $user->email = "メールアドレス";
> $user->password = Hash::make("パスワード");
> $user->save();

サーバー起動

php artisan serve

画面にアクセス

Access to http://127.0.0.1:8000/login

image

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?