main_watanabe #14
2
.env
2
.env
@ -2,7 +2,7 @@ APP_NAME=so-manager
|
|||||||
APP_ENV=local
|
APP_ENV=local
|
||||||
APP_KEY=base64:ejLwJbt2bEXY9emPUmsurG+X1hzkjTxQQvq2/FO14RY=
|
APP_KEY=base64:ejLwJbt2bEXY9emPUmsurG+X1hzkjTxQQvq2/FO14RY=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_URL=https://so-manager-dev.com/
|
APP_URL=https://so-manager-dev.com/public/
|
||||||
APP_LOCALE=ja
|
APP_LOCALE=ja
|
||||||
APP_FALLBACK_LOCALE=ja
|
APP_FALLBACK_LOCALE=ja
|
||||||
APP_FAKER_LOCALE=ja_JP
|
APP_FAKER_LOCALE=ja_JP
|
||||||
|
|||||||
@ -6,7 +6,7 @@ namespace App;
|
|||||||
class CommonFunction
|
class CommonFunction
|
||||||
{
|
{
|
||||||
// 7DSRチェックデジット計算
|
// 7DSRチェックデジット計算
|
||||||
public function calc7dsr($number) {
|
public static function calc7dsr($number) {
|
||||||
$sum = 0;
|
$sum = 0;
|
||||||
$weights = [2, 3, 4, 5, 6, 7];
|
$weights = [2, 3, 4, 5, 6, 7];
|
||||||
$digits = str_split(strrev($number));
|
$digits = str_split(strrev($number));
|
||||||
@ -18,7 +18,7 @@ class CommonFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 初期パスワード作成
|
// 初期パスワード作成
|
||||||
public function createPassword() {
|
public static function createPassword() {
|
||||||
// 使用可能文字 (使用不可:1,l,L,i,I,z,Z,2,o,O,0)
|
// 使用可能文字 (使用不可:1,l,L,i,I,z,Z,2,o,O,0)
|
||||||
$chars = 'ABCDEFGHJKMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz3456789';
|
$chars = 'ABCDEFGHJKMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz3456789';
|
||||||
$password = '';
|
$password = '';
|
||||||
@ -31,11 +31,16 @@ class CommonFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
// パスワードハッシュ化
|
// パスワードハッシュ化
|
||||||
public function hashPassword($user_seq, $password) {
|
public static function hashPassword($user_seq, $password) {
|
||||||
$hash = hash('sha256', $password) . $user_seq . 'SOMSALT';
|
$hash = hash('sha256', $password) . $user_seq . 'SOMSALT';
|
||||||
for ($i = 0; $i < 25; $i++) {
|
for ($i = 0; $i < 25; $i++) {
|
||||||
$hash = hash('sha256', $hash);
|
$hash = hash('sha256', $hash);
|
||||||
}
|
}
|
||||||
return $hash;
|
return $hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// パスワード照合
|
||||||
|
public static function verifyPassword($user_seq, $inputPassword, $hashedPassword) {
|
||||||
|
return self::hashPassword($user_seq, $inputPassword) === $hashedPassword;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -50,10 +50,10 @@ class InquiryConfirmController extends Controller
|
|||||||
// バリデーションチェック
|
// バリデーションチェック
|
||||||
$validator = Validator::make($request->all(), $rules, $message);
|
$validator = Validator::make($request->all(), $rules, $message);
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
return redirect('general.swo7_1')
|
return redirect('swo7_1')
|
||||||
->withErrors($validator)
|
->withErrors($validator)
|
||||||
->withInput()
|
->withInput()
|
||||||
->with('before_subject', implode(',', $request->input('subject')));
|
->with('before_subject', implode(',', (array) $request->input('subject', [])));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 画面返却値
|
// 画面返却値
|
||||||
@ -75,7 +75,7 @@ class InquiryConfirmController extends Controller
|
|||||||
{
|
{
|
||||||
// 前の画面に戻る
|
// 前の画面に戻る
|
||||||
if($request->input('back') == 'back'){
|
if($request->input('back') == 'back'){
|
||||||
return redirect('general.swo7_1')
|
return redirect('swo7_1')
|
||||||
->withInput($request->all())
|
->withInput($request->all())
|
||||||
->with('before_subject', $request->input('subject'));
|
->with('before_subject', $request->input('subject'));
|
||||||
}
|
}
|
||||||
|
|||||||
29
app/Http/Controllers/LoginController.php
Normal file
29
app/Http/Controllers/LoginController.php
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\CommonFunction;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
class LoginController extends Controller
|
||||||
|
{
|
||||||
|
// ログイン処理
|
||||||
|
public function login(Request $request)
|
||||||
|
{
|
||||||
|
// ID・パスワードチェック
|
||||||
|
$existingMember = User::where('user_primemail', $request->input('login_id'))->first();
|
||||||
|
if (!$existingMember || !CommonFunction::verifyPassword($existingMember->user_seq, $request->input('password'), $existingMember->user_pass)) {
|
||||||
|
return redirect('swo8_1')
|
||||||
|
->withErrors(['login' => 'ID/パスワードが間違っています'])
|
||||||
|
->withInput();
|
||||||
|
}
|
||||||
|
|
||||||
|
// セッションにユーザ情報を保存してマイページトップへ遷移
|
||||||
|
session(['user_id' => $existingMember->user_id]);
|
||||||
|
return redirect()->route('mypage');
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -23,7 +23,7 @@ class MemberRegistrationController extends Controller
|
|||||||
];
|
];
|
||||||
$validator = Validator::make($request->all(), $rules, $message);
|
$validator = Validator::make($request->all(), $rules, $message);
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
return redirect('general.swo2_1')
|
return redirect('swo2_1')
|
||||||
->withErrors($validator)
|
->withErrors($validator)
|
||||||
->withInput();
|
->withInput();
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ class MemberRegistrationController extends Controller
|
|||||||
$existingMember = User::where('user_primemail', $email)->get();
|
$existingMember = User::where('user_primemail', $email)->get();
|
||||||
foreach ($existingMember as $member) {
|
foreach ($existingMember as $member) {
|
||||||
if ($member->user_quit_flag != 1) {
|
if ($member->user_quit_flag != 1) {
|
||||||
return redirect('general.swo2_1')
|
return redirect('swo2_1')
|
||||||
->withErrors(['email' => '指定のメールアドレスは既に使用されています。'])
|
->withErrors(['email' => '指定のメールアドレスは既に使用されています。'])
|
||||||
->withInput();
|
->withInput();
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ class MemberRegistrationController extends Controller
|
|||||||
{
|
{
|
||||||
// 署名付きURLの有効期限チェック
|
// 署名付きURLの有効期限チェック
|
||||||
if (!request()->hasValidSignature()) {
|
if (!request()->hasValidSignature()) {
|
||||||
return redirect('general.error')->withErrors(['error' => '署名の有効期限が切れています']);
|
return redirect('error')->withErrors(['error' => '署名の有効期限が切れています']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初回遷移(GETアクセス)時のリクエストパラメータチェック
|
// 初回遷移(GETアクセス)時のリクエストパラメータチェック
|
||||||
@ -65,21 +65,21 @@ class MemberRegistrationController extends Controller
|
|||||||
// パラメータ存在チェック
|
// パラメータ存在チェック
|
||||||
$encryptedEmail = request()->query('email');
|
$encryptedEmail = request()->query('email');
|
||||||
if (!$encryptedEmail) {
|
if (!$encryptedEmail) {
|
||||||
return redirect('general.error')->withErrors(['error' => 'メールアドレスが指定されていません']);
|
return redirect('error')->withErrors(['error' => 'メールアドレスが指定されていません']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// パラメータ整合性チェック
|
// パラメータ整合性チェック
|
||||||
try {
|
try {
|
||||||
$email = decrypt($encryptedEmail);
|
$email = decrypt($encryptedEmail);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return redirect('general.error')->withErrors(['error' => 'メールアドレスの情報が不正です']);
|
return redirect('error')->withErrors(['error' => 'メールアドレスの情報が不正です']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 二重登録防止チェック
|
// 二重登録防止チェック
|
||||||
$existingMember = User::where('user_primemail', $email)->get();
|
$existingMember = User::where('user_primemail', $email)->get();
|
||||||
foreach ($existingMember as $member) {
|
foreach ($existingMember as $member) {
|
||||||
if ($member->user_quit_flag != 1) {
|
if ($member->user_quit_flag != 1) {
|
||||||
return redirect('general.error')->withErrors(['error' => '既に登録済みです']);
|
return redirect('error')->withErrors(['error' => '既に登録済みです']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ class MemberRegistrationController extends Controller
|
|||||||
{
|
{
|
||||||
// 登録完了後のブラウザバックによる二重登録対策
|
// 登録完了後のブラウザバックによる二重登録対策
|
||||||
if (!session()->has('email')) {
|
if (!session()->has('email')) {
|
||||||
return redirect('general.error')->withErrors(['error' => '不正なアクセスです']);
|
return redirect('error')->withErrors(['error' => '不正なアクセスです']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 入力チェック内容 (メールアドレスはセッションから取得するため対象外)
|
// 入力チェック内容 (メールアドレスはセッションから取得するため対象外)
|
||||||
@ -119,7 +119,7 @@ class MemberRegistrationController extends Controller
|
|||||||
// バリデーションチェック
|
// バリデーションチェック
|
||||||
$validator = Validator::make($request->all(), $rules, $message);
|
$validator = Validator::make($request->all(), $rules, $message);
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
return redirect('general.swo2_3')
|
return redirect('swo2_3')
|
||||||
->withErrors($validator)
|
->withErrors($validator)
|
||||||
->withInput();
|
->withInput();
|
||||||
}
|
}
|
||||||
@ -142,12 +142,12 @@ class MemberRegistrationController extends Controller
|
|||||||
{
|
{
|
||||||
// 前の画面に戻る
|
// 前の画面に戻る
|
||||||
if($request->input('back') == 'back'){
|
if($request->input('back') == 'back'){
|
||||||
return redirect('general.swo2_3')->withInput();
|
return redirect('swo2_3')->withInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 登録完了後のブラウザバックによる二重登録対策
|
// 登録完了後のブラウザバックによる二重登録対策
|
||||||
if (!session()->has('email')) {
|
if (!session()->has('email')) {
|
||||||
return redirect('general.error')->withErrors(['error' => '不正なアクセスです']);
|
return redirect('error')->withErrors(['error' => '不正なアクセスです']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 利用者連番、利用者ID(利用者連番+7DSRチェックデジット)、初期パスワード(ハッシュ化)を生成
|
// 利用者連番、利用者ID(利用者連番+7DSRチェックデジット)、初期パスワード(ハッシュ化)を生成
|
||||||
@ -165,8 +165,8 @@ class MemberRegistrationController extends Controller
|
|||||||
$user->tag_qr_flag = 1;
|
$user->tag_qr_flag = 1;
|
||||||
$user->user_name = $request->input('name');
|
$user->user_name = $request->input('name');
|
||||||
$user->user_phonetic = $request->input('kana');
|
$user->user_phonetic = $request->input('kana');
|
||||||
$user->user_homephone = $request->input('phone');
|
$user->user_homephone = implode('-', $request->input('phone'));
|
||||||
$user->user_mobile = $request->input('mobile');
|
$user->user_mobile = implode('-', $request->input('mobile'));
|
||||||
$user->user_primemail = session('email');
|
$user->user_primemail = session('email');
|
||||||
$user->user_quit_flag = 0;
|
$user->user_quit_flag = 0;
|
||||||
$user->created_at = now();
|
$user->created_at = now();
|
||||||
|
|||||||
21
app/Http/Controllers/ParkingSearchController.php
Normal file
21
app/Http/Controllers/ParkingSearchController.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
|
||||||
|
class ParkingSearchController extends Controller
|
||||||
|
{
|
||||||
|
// 初期表示
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
// 駐輪場情報検索
|
||||||
|
$park = \DB::table('park')->get();
|
||||||
|
|
||||||
|
// 検索結果返却
|
||||||
|
return view('general.swo5_1',['form_data' => $result ]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -30,7 +30,7 @@ class PasswordReminderController extends Controller
|
|||||||
// バリデーションチェック
|
// バリデーションチェック
|
||||||
$validator = Validator::make($request->all(), $rules, $message);
|
$validator = Validator::make($request->all(), $rules, $message);
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
return redirect('general.swo8_2')
|
return redirect('swo8_2')
|
||||||
->withErrors($validator)
|
->withErrors($validator)
|
||||||
->withInput();
|
->withInput();
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ class PasswordReminderController extends Controller
|
|||||||
$query->where('user_mobile', $phone)->orWhere('user_homephone', $phone);
|
$query->where('user_mobile', $phone)->orWhere('user_homephone', $phone);
|
||||||
})->first();
|
})->first();
|
||||||
if (!$existingMember) {
|
if (!$existingMember) {
|
||||||
return redirect('general.swo8_2')
|
return redirect('swo8_2')
|
||||||
->withErrors(['nodata' => '該当する会員情報が見つかりませんでした'])
|
->withErrors(['nodata' => '該当する会員情報が見つかりませんでした'])
|
||||||
->withInput();
|
->withInput();
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -10,23 +10,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-body mt30">
|
<div class="card-body mt30">
|
||||||
<form class="row form" action="{{ route('swo4_1') }}">
|
<form class="row form" action="{{ route('swo4_1') }}">
|
||||||
<div class="col-12 col-lg-3 text-lg-center offset-0 offset-lg-1">
|
<div class="col-12 col-lg-3 text-lg-center offset-0 offset-lg-1"><label>ログインID</label></div>
|
||||||
<label for="login_ID">ログインID</label>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-lg-7 mb10">
|
<div class="col-12 col-lg-7 mb10">
|
||||||
<input type="text" name="login_ID" id="login_ID" class="form-control form-control-lg" value="ログインID" />
|
<input type="text" name="login_id" class="form-control form-control-lg" value="{{ old('login_id') }}" />
|
||||||
</div>
|
|
||||||
<div class="col-12 col-lg-3 text-lg-center offset-0 offset-lg-1">
|
|
||||||
<label for="login_ID">パスワード</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-12 col-lg-3 text-lg-center offset-0 offset-lg-1"><label>パスワード</label></div>
|
||||||
<div class="col-12 col-lg-7 mb10">
|
<div class="col-12 col-lg-7 mb10">
|
||||||
<input type="text" name="login_ID" id="login_ID" class="form-control form-control-lg" value="パスワード" />
|
<input type="text" name="password" class="form-control form-control-lg" value="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-6 text-lg-center offset-0 offset-lg-3 mt30 mb50">
|
<div class="col-12 col-lg-6 text-lg-center offset-0 offset-lg-3 mt30 mb50">
|
||||||
|
<div class="text-danger">@if ($errors->any()) @foreach ($errors->all() as $error) {{ $error }} @endforeach @endif</div><br />
|
||||||
<input type="submit" name="submit" class="btn btn-block btn-lg btn-success" value="ログイン" /><br>
|
<input type="submit" name="submit" class="btn btn-block btn-lg btn-success" value="ログイン" /><br>
|
||||||
<a href="{{route('swo2_1')}}" class="text-secondary mt20">新規会員登録はこちら 〉</a><br>
|
<a href="{{route('swo2_1')}}" class="text-secondary mt20">新規会員登録はこちら 〉</a><br>
|
||||||
<a href="{{route('swo8_2')}}" class="text-secondary mt20">パスワードを忘れた方はこちら 〉</a>
|
<a href="{{route('swo8_2')}}" class="text-secondary mt20">パスワードを忘れた方はこちら 〉</a>
|
||||||
</div>
|
</div>
|
||||||
|
@csrf
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
|
|||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Controllers\InquiryConfirmController;
|
use App\Http\Controllers\InquiryConfirmController;
|
||||||
|
use App\Http\Controllers\LoginController;
|
||||||
use App\Http\Controllers\MemberRegistrationController;
|
use App\Http\Controllers\MemberRegistrationController;
|
||||||
use App\Http\Controllers\PasswordReminderController;
|
use App\Http\Controllers\PasswordReminderController;
|
||||||
use App\Http\Controllers\UserInfoController;
|
use App\Http\Controllers\UserInfoController;
|
||||||
@ -17,6 +18,7 @@ use App\Http\Controllers\UserEditConfirmController;
|
|||||||
use App\Http\Controllers\UserWithdrawController;
|
use App\Http\Controllers\UserWithdrawController;
|
||||||
use App\Http\Controllers\RegularContractController;
|
use App\Http\Controllers\RegularContractController;
|
||||||
use App\Http\Controllers\RegularContractCreateController;
|
use App\Http\Controllers\RegularContractCreateController;
|
||||||
|
use App\Http\Controllers\ParkingSearchController;
|
||||||
use App\Http\Controllers\ParkWaitlistController;
|
use App\Http\Controllers\ParkWaitlistController;
|
||||||
use App\Http\Controllers\ReceiptController;
|
use App\Http\Controllers\ReceiptController;
|
||||||
|
|
||||||
@ -26,8 +28,6 @@ Route::get('/swo2_1', function () { return view('general.swo2_1'); })->name('swo
|
|||||||
Route::get('/swo3_1', function () { return view('general.swo3_1'); })->name('swo3_1');
|
Route::get('/swo3_1', function () { return view('general.swo3_1'); })->name('swo3_1');
|
||||||
Route::get('/swo3_2', function () { return view('general.swo3_2'); })->name('swo3_2');
|
Route::get('/swo3_2', function () { return view('general.swo3_2'); })->name('swo3_2');
|
||||||
Route::get('/swo3_3', function () { return view('general.swo3_3'); })->name('swo3_3');
|
Route::get('/swo3_3', function () { return view('general.swo3_3'); })->name('swo3_3');
|
||||||
Route::get('/swo4_1', function () { return view('general.swo4_1'); })->name('swo4_1');
|
|
||||||
Route::get('/swo5_1', function () { return view('general.swo5_1'); })->name('swo5_1');
|
|
||||||
Route::get('/swo6_1', function () { return view('general.swo6_1'); })->name('swo6_1');
|
Route::get('/swo6_1', function () { return view('general.swo6_1'); })->name('swo6_1');
|
||||||
Route::get('/swo8_1', function () { return view('general.swo8_1'); })->name('swo8_1');
|
Route::get('/swo8_1', function () { return view('general.swo8_1'); })->name('swo8_1');
|
||||||
Route::get('/swo8_2', function () { return view('general.swo8_2'); })->name('swo8_2');
|
Route::get('/swo8_2', function () { return view('general.swo8_2'); })->name('swo8_2');
|
||||||
@ -47,20 +47,27 @@ Route::get('/swo16_1', function () { return view('general.swo16_1'); })->name('s
|
|||||||
Route::get('/swo17_1', function () { return view('general.swo17_1'); })->name('swo17_1');
|
Route::get('/swo17_1', function () { return view('general.swo17_1'); })->name('swo17_1');
|
||||||
Route::get('/error', function () { return view('general.error'); })->name('error');
|
Route::get('/error', function () { return view('general.error'); })->name('error');
|
||||||
|
|
||||||
// コントローラー経由
|
// コントローラー経由
|
||||||
Route::post('/swo2_2', [MemberRegistrationController::class, 'sendMail'])->name('swo2_2');
|
Route::post('/swo2_2', [MemberRegistrationController::class, 'sendMail'])->name('swo2_2');
|
||||||
Route::get('/swo2_3', [MemberRegistrationController::class, 'index'])->name('swo2_3')->middleware('signed');
|
Route::get('/swo2_3', [MemberRegistrationController::class, 'index'])->name('swo2_3')->middleware('signed');
|
||||||
Route::post('/swo2_4', [MemberRegistrationController::class, 'confirm'])->name('swo2_4');
|
Route::post('/swo2_4', [MemberRegistrationController::class, 'confirm'])->name('swo2_4');
|
||||||
Route::post('/swo2_5', [MemberRegistrationController::class, 'complete'])->name('swo2_5');
|
Route::post('/swo2_5', [MemberRegistrationController::class, 'complete'])->name('swo2_5');
|
||||||
|
Route::get('/swo4_1', [LoginController::class, 'login'])->name('swo4_1');
|
||||||
|
Route::get('/swo5_1', [ParkingSearchController::class, 'index'])->name('swo5_1');
|
||||||
Route::get('/swo7_1', [InquiryConfirmController::class, 'index'])->name('swo7_1');
|
Route::get('/swo7_1', [InquiryConfirmController::class, 'index'])->name('swo7_1');
|
||||||
Route::post('/swo7_2',[InquiryConfirmController::class, 'confirm'])->name('swo7_2');
|
Route::post('/swo7_2',[InquiryConfirmController::class, 'confirm'])->name('swo7_2');
|
||||||
Route::post('/swo7_3',[InquiryConfirmController::class, 'complete'])->name('swo7_3');
|
Route::post('/swo7_3',[InquiryConfirmController::class, 'complete'])->name('swo7_3');
|
||||||
Route::post('/swo8_3', [PasswordReminderController::class, 'sendMail'])->name('swo8_3');
|
Route::post('/swo8_3', [PasswordReminderController::class, 'sendMail'])->name('swo8_3');
|
||||||
|
|
||||||
//マイページ(仮)
|
// ログイン画面へのリダイレクト
|
||||||
|
Route::get('/login', function () {
|
||||||
|
return redirect()->route('swo8_1');
|
||||||
|
})->name('login');
|
||||||
|
|
||||||
|
// マイページ画面へのリダイレクト
|
||||||
Route::get('/mypage', function () {
|
Route::get('/mypage', function () {
|
||||||
return 'マイページ(仮)';
|
return 'マイページ(仮)';
|
||||||
})->name('mypage');
|
})->name('mypage');
|
||||||
|
|
||||||
// ユーザー情報確認画面
|
// ユーザー情報確認画面
|
||||||
Route::get('/user/info', [UserInfoController::class, 'show'])
|
Route::get('/user/info', [UserInfoController::class, 'show'])
|
||||||
@ -132,17 +139,6 @@ Route::post('regular_contract/update_period', [App\Http\Controllers\RegularContr
|
|||||||
Route::get('park_waitlist', [ParkWaitlistController::class, 'index'])
|
Route::get('park_waitlist', [ParkWaitlistController::class, 'index'])
|
||||||
->name('park_waitlist.index');
|
->name('park_waitlist.index');
|
||||||
|
|
||||||
// ログイン画面(仮)
|
|
||||||
Route::get('/login', function () {
|
|
||||||
return '
|
|
||||||
<form method="POST" action="/login">
|
|
||||||
<input type="hidden" name="_token" value="' . csrf_token() . '">
|
|
||||||
<input type="text" name="user_id" placeholder="ユーザーID">
|
|
||||||
<button type="submit">ログイン</button>
|
|
||||||
</form>
|
|
||||||
';
|
|
||||||
})->name('login');
|
|
||||||
|
|
||||||
Route::post('/login', function (Request $request) {
|
Route::post('/login', function (Request $request) {
|
||||||
$user_id = $request->input('user_id');
|
$user_id = $request->input('user_id');
|
||||||
Session::put('user_id', $user_id); // 入力されたIDをそのまま保存
|
Session::put('user_id', $user_id); // 入力されたIDをそのまま保存
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user