Compare commits
No commits in common. "831b25ae8b8d44223df3b7abd128f37b702ae912" and "e70c834bb02881ce786fa81d94afea01e56b67bb" have entirely different histories.
831b25ae8b
...
e70c834bb0
@ -1,52 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
class UserInformationController extends Controller
|
|
||||||
{
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
$user_id = session('user_id');
|
|
||||||
if (!$user_id) {
|
|
||||||
return redirect('/login');
|
|
||||||
}
|
|
||||||
$user_name = DB::table('user')->where('user_id', $user_id)->value('user_name');
|
|
||||||
|
|
||||||
// お知らせデータ取得
|
|
||||||
$informations = DB::table('user_information_history')
|
|
||||||
->where('user_id', $user_id)
|
|
||||||
->orderByDesc('user_information_history_id')
|
|
||||||
->select('entry_date', 'user_information_history')
|
|
||||||
->limit(10)
|
|
||||||
->get();
|
|
||||||
|
|
||||||
return view('user_information.index', [
|
|
||||||
'user_name' => $user_name, // ユーザー名(ヘッダー用)
|
|
||||||
'informations' => $informations
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function history()
|
|
||||||
{
|
|
||||||
$user_id = session('user_id');
|
|
||||||
if (!$user_id) {
|
|
||||||
return redirect('/login');
|
|
||||||
}
|
|
||||||
$user_name = DB::table('user')->where('user_id', $user_id)->value('user_name');
|
|
||||||
|
|
||||||
// お知らせデータ取得(全件)
|
|
||||||
$informations = DB::table('user_information_history')
|
|
||||||
->where('user_id', $user_id)
|
|
||||||
->orderByDesc('user_information_history_id')
|
|
||||||
->select('entry_date', 'user_information_history')
|
|
||||||
->paginate(10);
|
|
||||||
|
|
||||||
return view('user_information.history', [
|
|
||||||
'user_name' => $user_name, // ユーザー名(ヘッダー用)
|
|
||||||
'informations' => $informations
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
@section('content')
|
|
||||||
<main>
|
|
||||||
<header class="alert alert-success">
|
|
||||||
<h4 class="container">お知らせ > 過去のお知らせ</h4>
|
|
||||||
</header>
|
|
||||||
<section id="" class="container mt30 mb50">
|
|
||||||
<div class="col-12 col-md-8 offset-0 offset-md-2 mb30">
|
|
||||||
<h3 class="text-center alert-success">お知らせ一覧</h3>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
@forelse($informations as $information)
|
|
||||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
|
||||||
<h5 class="text-success">
|
|
||||||
{{ \Carbon\Carbon::parse($information->entry_date)->format('Y年n月j日') }}
|
|
||||||
</h5>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-lg-7 mb10">
|
|
||||||
<p class="h5 font-weight-normal">
|
|
||||||
{{ $information->user_information_history }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
@empty
|
|
||||||
<div class="col-12 text-center py-5">
|
|
||||||
<p>過去のお知らせはありません。</p>
|
|
||||||
</div>
|
|
||||||
@endforelse
|
|
||||||
</div>
|
|
||||||
<div class="d-flex justify-content-center mt-4">
|
|
||||||
{{ $informations->links('partials.paging') }}
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-6 offset-0 offset-md-3 mt-4 mb50">
|
|
||||||
<a href="{{ url('mypage') }}" class="btn btn-lg btn-block btn-outline-success">マイページへ戻る</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
@endsection
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
@section('content')
|
|
||||||
<main>
|
|
||||||
<header class="alert alert-success">
|
|
||||||
<h4 class="container">お知らせ > お知らせ一覧</h4>
|
|
||||||
</header>
|
|
||||||
<section id="" class="container mt30 mb50">
|
|
||||||
<div class="col-12 col-md-8 offset-0 offset-md-2 mb30">
|
|
||||||
<h3 class="text-center alert-success">お知らせ一覧</h3>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
@forelse($informations as $information)
|
|
||||||
<div class="col-12 col-md-3 offset-0 offset-md-2">
|
|
||||||
<h5 class="text-success">
|
|
||||||
{{ \Carbon\Carbon::parse($information->entry_date)->format('Y年n月j日') }}
|
|
||||||
</h5>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-lg-7 mb10">
|
|
||||||
<p class="h5 font-weight-normal">
|
|
||||||
{{ $information->user_information_history }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
@empty
|
|
||||||
<div class="col-12 text-center py-5">
|
|
||||||
<p>お知らせはありません。</p>
|
|
||||||
</div>
|
|
||||||
@endforelse
|
|
||||||
|
|
||||||
<div class="col-12 col-md-5 offset-md-1 mt10">
|
|
||||||
<a href="{{ url('mypage') }}" class="btn btn-lg btn-block btn-outline-success">マイページへ戻る</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-5 mt10">
|
|
||||||
<a href="{{ url('user_information/history') }}" class="btn btn-lg btn-block btn-outline-success">過去のお知らせ</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
@endsection
|
|
||||||
@ -22,7 +22,6 @@ 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;
|
||||||
use App\Http\Controllers\ParkDetailController;
|
use App\Http\Controllers\ParkDetailController;
|
||||||
use App\Http\Controllers\UserInformationController;
|
|
||||||
|
|
||||||
// 画面遷移のみ
|
// 画面遷移のみ
|
||||||
Route::get('/', function () { return view('general.swo1_1'); })->name('swo1_1');
|
Route::get('/', function () { return view('general.swo1_1'); })->name('swo1_1');
|
||||||
@ -134,10 +133,6 @@ Route::get('park_search', [RegularContractCreateController::class, 'show'])->nam
|
|||||||
// 空き待ち状況確認
|
// 空き待ち状況確認
|
||||||
Route::get('park_waitlist', [ParkWaitlistController::class, 'index'])->name('park_waitlist.index');
|
Route::get('park_waitlist', [ParkWaitlistController::class, 'index'])->name('park_waitlist.index');
|
||||||
|
|
||||||
// 会員へのお知らせ
|
|
||||||
Route::get('/user_information', [UserInformationController::class, 'index'])->name('user_information.index');
|
|
||||||
Route::get('/user_information/history', [UserInformationController::class, 'history'])->name('user_information.history');
|
|
||||||
|
|
||||||
// ウェルネット決済画面(仮)
|
// ウェルネット決済画面(仮)
|
||||||
Route::get('/wellnet/payment', function (): mixed {
|
Route::get('/wellnet/payment', function (): mixed {
|
||||||
$html = <<<HTML
|
$html = <<<HTML
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user