Closed s19013 closed 1 year ago
reservation テーブルを[名前,メアド]の2つでgroup で絞る
//イメージ表 |
name | |
---|---|---|
aaa | abcd@gmail.com | |
bbb | qwer@gmail.com |
同じ名前とメアドがない場合
これらをusers
テーブルに登録していく
reservations
テーブルを編集するuser_id
を追加するカラム名 | 型 | |
---|---|---|
user_id | unsignedBigInt | references('id')->on('user')->cascadeOnDelete() |
またreservation
テーブルを[名前,メアド]とuses
テーブルと見比べてreservation
テーブルのuser_id
にusers
テーブルのid
を入れる
すべて入れたらreservations
テーブルのname
とemail
を消す
admin/reservation/index.balde.php
を修正する
reservation
モデルとuser
モデルにリレーション追加
初期パスはランダムに生成してもらう ->ランダムだとハッシュ化されたあと値がわからなくなりユーザーにパスワードをつたえることができなくなるので ->危ないがこちらで統一させてもらう ->ユーザー側で変更してもらおう
konamiのpaseriで会員登録せずにpaseriチャージをしたら自動的にアカウントを発行されたことあったし。いける!