From 4df74f116ca2d5e1cc74104bd0b40a542228f1b6 Mon Sep 17 00:00:00 2001 From: "kin.rinzen" Date: Fri, 10 Oct 2025 19:37:05 +0900 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=E6=8C=87=E6=91=98=E5=AF=BE=E5=BF=9C?= =?UTF-8?q?=E3=80=8DSWA-65=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Admin/PtypeController.php | 179 ++++++------ .../Controllers/Admin/StationController.php | 156 +++++++--- app/Models/Station.php | 7 + resources/lang/ja/validation.php | 14 + resources/views/admin/ptypes/_form.blade.php | 98 +++++-- resources/views/admin/ptypes/add.blade.php | 15 +- resources/views/admin/ptypes/edit.blade.php | 37 +-- resources/views/admin/ptypes/info.blade.php | 47 --- resources/views/admin/ptypes/list.blade.php | 121 +++----- .../views/admin/stations/_form.blade.php | 274 +++++++++--------- resources/views/admin/stations/add.blade.php | 6 +- resources/views/admin/stations/edit.blade.php | 15 +- resources/views/admin/stations/info.blade.php | 24 -- resources/views/admin/stations/list.blade.php | 19 +- 14 files changed, 531 insertions(+), 481 deletions(-) delete mode 100644 resources/views/admin/ptypes/info.blade.php delete mode 100644 resources/views/admin/stations/info.blade.php diff --git a/app/Http/Controllers/Admin/PtypeController.php b/app/Http/Controllers/Admin/PtypeController.php index 3cd0e02..23569e4 100644 --- a/app/Http/Controllers/Admin/PtypeController.php +++ b/app/Http/Controllers/Admin/PtypeController.php @@ -31,125 +31,112 @@ class PtypeController extends Controller return view('admin.ptypes.list', $inputs); } - + + /** + * 新規登録(画面/処理) + */ public function add(Request $request) { - $inputs = [ - //TODO 駐輪分類ID not found in database specs - 'ptype_subject' => $request->input('ptype_subject'), // 駐輪分類名 - 'ptype_remarks' => $request->input('ptype_remarks'), // 備考 - ]; - - if ($request->isMethod('POST')) { - $rules = [ - 'ptype_subject' => 'required|string|max:255', - 'floor_sort' => 'nullable|integer', - 'ptype_remarks' => 'nullable|string|max:255', - ]; - $messages = [ - 'ptype_subject.required' => '駐輪分類名は必須です。', - ]; - $validator = Validator::make($request->all(), $rules, $messages); - if (!$validator->fails()) { - \DB::transaction(function () use ($inputs, &$type) { - $new = new Ptype(); - $new->fill($inputs); - if ($new->save()) { - $type = true; - } - - }); - if ($type) { - $request->session()->flash('success', __('データ新規作成しました。')); - return redirect()->route('ptypes'); - } else { - $request->session()->flash('error', __('新規作成に失敗しました')); - } - } else { - $inputs['errorMsg'] = $this->__buildErrorMessasges($validator); - } + if ($request->isMethod('get')) { + // 新規時は空のレコードを用意してフォーム描画 + return view('admin.ptypes.add', [ + 'isEdit' => false, + 'record' => new Ptype(), // ← ★ Blade側で record->〇〇 が使える + ]); } - return view('admin.ptypes.add', $inputs); + // POST時:バリデーション + $rules = [ + 'ptype_subject' => 'required|string|max:255', + 'ptype_remarks' => 'nullable|string|max:255', + ]; + $messages = [ + 'ptype_subject.required' => '駐輪分類名は必須です。', + ]; + + $validator = Validator::make($request->all(), $rules, $messages); + + if ($validator->fails()) { + return redirect()->back()->withErrors($validator)->withInput(); + } + + DB::transaction(function () use ($request) { + $new = new Ptype(); + $new->fill($request->only(['ptype_subject', 'ptype_remarks'])); + $new->save(); + }); + + return redirect()->route('ptypes')->with('success', '登録しました。'); } - public function edit(Request $request, $pk, $view = '') + /** + * 編集(画面/処理) + */ + public function edit(Request $request, $id) { - $ptype = Ptype::getByPk($pk); - if (empty($pk) || empty($ptype)) { + // 該当データ取得 + $record = Ptype::find($id); + if (!$record) { abort(404); } - // 追加のドロップダウンなどがある場合 - $dataList = $this->getDataDropList(); - - if ($request->isMethod('POST')) { - $type = false; - - // バリデーションルール - $rules = [ - 'ptype_subject' => 'required|string|max:255', - 'floor_sort' => 'nullable|integer', - 'ptype_remarks' => 'nullable|string|max:255', - ]; - $messages = [ - 'ptype_subject.required' => '駐輪分類名は必須です。', - ]; - - $validator = Validator::make($request->all(), $rules, $messages); - - if (!$validator->fails()) { - \DB::transaction(function () use ($request, &$type, $ptype) { - $ptype->fill($request->all()); - $ptype->save(); - $type = true; - }); - if ($type) { - $request->session()->flash('success', __('更新に成功しました')); - return redirect()->route('ptypes'); - } else { - $request->session()->flash('error', __('更新に失敗しました')); - } - } else { - return redirect()->back() - ->withErrors($validator) - ->withInput(); - } + if ($request->isMethod('get')) { + // 編集画面表示 + return view('admin.ptypes.edit', [ + 'isEdit' => true, + 'record' => $record, + ]); } - // Blade に渡すときはモデルそのものを渡す - if ($view != '') { - return view($view, array_merge($dataList, ['item' => $ptype])); + // POST時:バリデーション + $rules = [ + 'ptype_subject' => 'required|string|max:255', + 'floor_sort' => 'nullable|string|max:50', + + 'ptype_remarks' => 'nullable|string|max:255', + ]; + $messages = [ + 'ptype_subject.required' => '駐輪分類名は必須です。', + ]; + + $validator = Validator::make($request->all(), $rules, $messages); + + if ($validator->fails()) { + return redirect()->back()->withErrors($validator)->withInput(); } - return view('admin.ptypes.edit', array_merge($dataList, [ - 'item' => $ptype, - 'ptype_id' => $ptype->ptype_id, - ])); + + DB::transaction(function () use ($request, $record) { + $record->fill($request->only(['ptype_subject','floor_sort', 'ptype_remarks'])); + $record->save(); + }); + + return redirect()->route('ptypes')->with('success', '更新しました。'); } + /** + * 削除(単一/複数対応) + */ public function delete(Request $request) { - $arr_pk = $request->get('pk'); + $ids = []; - // 単体削除の場合 string が来るので配列に変換 - if (!is_array($arr_pk)) { - $arr_pk = [$arr_pk]; + if ($request->filled('id')) { + $ids[] = (int) $request->input('id'); } - if ($arr_pk && count($arr_pk) > 0) { - if (Ptype::whereIn('ptype_id', $arr_pk)->delete()) { - return redirect()->route('ptypes')->with('success', __("削除が完了しました。")); - } else { - return redirect()->route('ptypes')->with('error', __('削除に失敗しました。')); - } + if (is_array($request->input('pk'))) { + $ids = array_merge($ids, $request->input('pk')); } - return redirect()->route('ptypes')->with('error', __('削除するデータを選択してください。')); - } + $ids = array_values(array_unique(array_map('intval', $ids))); - public function info(Request $request, $id) - { - return $this->edit($request, $id, 'admin.ptypes.info'); + if (empty($ids)) { + return back()->with('error', '削除対象が選択されていません。'); + } + + Ptype::whereIn('ptype_id', $ids)->delete(); + + return redirect()->route('ptypes')->with('success', '削除しました。'); } public function getDataDropList() diff --git a/app/Http/Controllers/Admin/StationController.php b/app/Http/Controllers/Admin/StationController.php index 74901c9..0866281 100644 --- a/app/Http/Controllers/Admin/StationController.php +++ b/app/Http/Controllers/Admin/StationController.php @@ -5,6 +5,10 @@ namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\Station; +use Illuminate\Support\Facades\Validator; +use Illuminate\Support\Facades\DB; +use App\Models\Park; + class StationController extends Controller { @@ -38,8 +42,8 @@ class StationController extends Controller 'station_route_name', 'park_id', 'operator_id', - // 'station_latitude', 追加予定 - // 'station_longitude', 追加予定 + 'station_latitude', + 'station_longitude', ]) ->orderBy($sort, $sort_type) ->paginate(20); @@ -48,74 +52,140 @@ class StationController extends Controller } - /** - * 新規登録 - */ public function add(Request $request) { - if ($request->isMethod('post')) { - $validated = $request->validate([ - 'station_neighbor_station' => 'required|string|max:255', - 'station_name_ruby' => 'nullable|string|max:255', - 'station_route_name' => 'nullable|string|max:255', - 'park_id' => 'nullable|integer', - 'operator_id' => 'nullable|integer', - ]); + if ($request->isMethod('get')) { + // 駐車場リストを取得(プルダウン用) + $parks = Park::orderBy('park_name')->pluck('park_name', 'park_id'); - Station::create($validated); - return redirect()->route('stations')->with('success', '近傍駅が登録されました'); + // 新規時:空レコードを渡す + return view('admin.stations.add', [ + 'isEdit' => false, + 'record' => new Station(), + 'parks' => $parks, // ← これを追加 + ]); } - return view('admin.stations.add'); + // POST時:バリデーション + $rules = [ + 'station_neighbor_station' => 'required|string|max:255', + 'station_name_ruby' => 'required|string|max:255', + 'station_route_name' => 'required|string|max:255', + 'station_latitude' => 'required|numeric', + 'station_longitude' => 'required|numeric', + 'operator_id' => 'nullable|integer', + 'park_id' => 'required|integer', + ]; + + $messages = [ + 'station_latitude.required' => '緯度は必須項目です。', + 'station_longitude.required' => '経度は必須項目です。', + ]; + + $validator = Validator::make($request->all(), $rules, $messages); + + if ($validator->fails()) { + return redirect()->back()->withErrors($validator)->withInput(); + } + + DB::transaction(function () use ($request) { + Station::create($request->only([ + 'station_neighbor_station', + 'station_name_ruby', + 'station_route_name', + 'station_latitude', + 'station_longitude', + 'park_id', + 'operator_id', + ])); + }); + + return redirect()->route('stations')->with('success', '登録しました。'); } /** - * 編集 + * 編集(画面/処理) */ public function edit(Request $request, $id) { - $station = Station::findOrFail($id); + $record = Station::findOrFail($id); - if ($request->isMethod('post')) { - $validated = $request->validate([ - 'station_neighbor_station' => 'required|string|max:255', - 'station_name_ruby' => 'nullable|string|max:255', - 'station_route_name' => 'nullable|string|max:255', - 'park_id' => 'nullable|integer', - 'operator_id' => 'nullable|integer', + if ($request->isMethod('get')) { + // 駐車場リストを取得(プルダウン用) + $parks = Park::orderBy('park_name')->pluck('park_name', 'park_id'); + + return view('admin.stations.edit', [ + 'isEdit' => true, + 'record' => $record, + 'parks' => $parks, // ← ここを追加 ]); - - $station->update($validated); - return redirect()->route('stations')->with('success', '更新しました'); } - return view('admin.stations.edit', compact('station')); + // ▼ POST時:バリデーション + $rules = [ + 'station_neighbor_station' => 'required|string|max:255', + 'station_name_ruby' => 'required|string|max:255', + 'station_route_name' => 'required|string|max:255', + 'station_latitude' => 'required|numeric', + 'station_longitude' => 'required|numeric', + 'operator_id' => 'nullable|integer', + 'park_id' => 'required|integer', + ]; + + $messages = [ + 'station_latitude.required' => '緯度は必須項目です。', + 'station_longitude.required' => '経度は必須項目です。', + ]; + + $validator = Validator::make($request->all(), $rules, $messages); + + if ($validator->fails()) { + return redirect()->back()->withErrors($validator)->withInput(); + } + + DB::transaction(function () use ($request, $record) { + $record->update($request->only([ + 'station_neighbor_station', + 'station_name_ruby', + 'station_route_name', + 'park_id', + 'operator_id', + 'station_latitude', + 'station_longitude', + ])); + }); + + return redirect()->route('stations')->with('success', '更新しました。'); } - /** - * 詳細 - */ - public function info($id) - { - $station = Station::findOrFail($id); - return view('admin.stations.info', compact('station')); - } /** - * 削除 + * 削除(単一/複数対応) */ public function delete(Request $request) { - $ids = $request->input('pk'); // 複数ID対応 + $ids = []; - if (!empty($ids)) { - Station::destroy($ids); - return redirect()->route('stations')->with('success', '削除しました'); + if ($request->filled('id')) { + $ids[] = (int) $request->input('id'); } - return redirect()->route('stations')->with('error', '削除対象が見つかりません'); + if (is_array($request->input('pk'))) { + $ids = array_merge($ids, $request->input('pk')); + } + + $ids = array_values(array_unique(array_map('intval', $ids))); + + if (empty($ids)) { + return back()->with('error', '削除対象が選択されていません。'); + } + + Station::whereIn('station_id', $ids)->delete(); + + return redirect()->route('stations')->with('success', '削除しました'); } + /** * CSVインポート(仮) */ diff --git a/app/Models/Station.php b/app/Models/Station.php index b10b994..f6b87c6 100644 --- a/app/Models/Station.php +++ b/app/Models/Station.php @@ -15,5 +15,12 @@ class Station extends Model 'station_name_ruby', 'station_route_name', 'operator_id', + 'station_latitude', // ← 緯度 + 'station_longitude', // ← 経度 ]; + public function park() + { + return $this->belongsTo(Park::class, 'park_id', 'park_id'); + } + } diff --git a/resources/lang/ja/validation.php b/resources/lang/ja/validation.php index 542e34e..9fcc95a 100644 --- a/resources/lang/ja/validation.php +++ b/resources/lang/ja/validation.php @@ -254,6 +254,9 @@ return [ 'user_categoryid' => '利用者分類ID', 'pplace_id' => '駐輪車室ID', 'price' => '駐輪料金(税込)', + 'floor_sort' => '階数ソート順', + + // SWA-59 'ope_id' => 'オペレータID', // 'ope_id' => 'オペレータ名', @@ -423,6 +426,17 @@ return [ 'edit_master' => 'マスタ編集', 'web_master' => 'ウェブ参照マスタ', 'auto_change_date' => 'ウェブ参照マスタ自動切り替え日時', +//SWA-65 + 'station_id' => '近傍駅ID', + 'created_at' => '登録日時', + 'updated_at' => '更新日時', + 'park_id' => '駐輪場ID', + 'station_neighbor_station' => '近傍駅', + 'station_name_ruby' => '近傍駅ふりがな', + 'station_route_name' => '路線名', + 'station_latitude' => '近傍駅座標(緯度)', + 'station_longitude' => '近傍駅座標(経度)', + 'operator_id' => '更新オペレータID', diff --git a/resources/views/admin/ptypes/_form.blade.php b/resources/views/admin/ptypes/_form.blade.php index 5ec2822..14715b4 100644 --- a/resources/views/admin/ptypes/_form.blade.php +++ b/resources/views/admin/ptypes/_form.blade.php @@ -1,62 +1,102 @@ +{{-- アラート --}} @if(Session::has('success')) -@elseif(Session::has('error')) +@endif + +@if($errors->any())
-

{{__('誤差')}}:

- {!! Session::get('error') !!} -
-@elseif(isset($errorMsg)) -
- -

{{__('誤差')}}:

- {!! $errorMsg !!} +

{{ __('入力内容に不備があります:') }}

+
@endif
+ {{-- ▼ 駐輪分類ID(編集時のみ表示) --}} + @if($isEdit && isset($record->ptype_id))
- ptype_id)) readonly @endif> +
+ @endif + + {{-- ▼ 駐輪分類名 --}}
- +
- +
+ + {{-- ▼ 階数ソート順 --}}
- +
+ + {{-- ▼ 備考 --}}
- +
+ + {{-- ▼ 下部ボタン --}} +
+
+ + {{-- 登録ボタン --}} + @if($isEdit) + + @else + + @endif + + {{-- 削除ボタン(編集時のみ表示) --}} + @if($isEdit) + + @endif + +
+
+
-{{-- ▼ 下部ボタン --}} -
- {{-- 登録ボタン --}} - - {{-- 削除ボタン(編集画面のみ表示) --}} - @if(!empty($ptype_id)) - -
- @csrf - - -
- @endif -
diff --git a/resources/views/admin/ptypes/add.blade.php b/resources/views/admin/ptypes/add.blade.php index e542e26..9f00933 100644 --- a/resources/views/admin/ptypes/add.blade.php +++ b/resources/views/admin/ptypes/add.blade.php @@ -1,6 +1,6 @@ @extends('layouts.app') -@section('title', '[東京都|〇〇駐輪場] 駐輪分類マスタ') +@section('title', '新規') @section('content') @@ -8,14 +8,13 @@
-

新規登録

+

新規

@@ -31,11 +30,9 @@
-
- - - - @include('admin.ptypes._form',['isEdit'=>0,'isInfo'=>0]) + + @csrf + @include('admin.ptypes._form', ['isEdit' => false, 'record' => $record])
diff --git a/resources/views/admin/ptypes/edit.blade.php b/resources/views/admin/ptypes/edit.blade.php index 06ef475..7ed2341 100644 --- a/resources/views/admin/ptypes/edit.blade.php +++ b/resources/views/admin/ptypes/edit.blade.php @@ -1,5 +1,5 @@ @extends('layouts.app') -@section('title', '[東京都|〇〇駐輪場] 駐輪分類マスタ') +@section('title', '編集') @section('content') @@ -21,23 +21,26 @@
- -
-
- +
+
+
+
+ @csrf + @include('admin.ptypes._form', ['isEdit' => true]) +
-
-
-
-
- @csrf - @include('admin.ptypes._form',['isEdit'=>1,'isInfo'=>0]) -
-
-
-
+ {{-- Delete Form --}} +
-
- +
+
@endsection diff --git a/resources/views/admin/ptypes/info.blade.php b/resources/views/admin/ptypes/info.blade.php deleted file mode 100644 index a07d3c5..0000000 --- a/resources/views/admin/ptypes/info.blade.php +++ /dev/null @@ -1,47 +0,0 @@ - -@extends('layouts.app') -@section('title', '[東京都|〇〇駐輪場] 駐輪分類マスタ') - -@section('content') - -
-
-
-
-

[東京都|〇〇駐輪場] 駐輪分類マスタ

-
-
- -
-
-
-
- - - -
-
- - -
-
-
-
- - - - @include('admin.ptypes._form',['isEdit'=>0,'isInfo'=>1]) -
-
-
-
- -
- - -@endsection diff --git a/resources/views/admin/ptypes/list.blade.php b/resources/views/admin/ptypes/list.blade.php index c6d2177..1e06efb 100644 --- a/resources/views/admin/ptypes/list.blade.php +++ b/resources/views/admin/ptypes/list.blade.php @@ -1,8 +1,7 @@ @extends('layouts.app') -@section('title', '[東京都|〇〇駐輪場] 駐輪分類マスタ') +@section('title', '駐輪分類マスタ') @section('content') -{{-- ▼ コンテンツヘッダー(パンくず) --}}
@@ -12,7 +11,6 @@
@@ -32,32 +30,13 @@ {{-- ▼ アクションボタン(市区マスタ準拠) --}}
新規 - +
- {{-- ▼ フラッシュメッセージ --}} - @if(Session::has('success')) - - @elseif(Session::has('error')) -
- -

{{__('誤差')}}:

- {!! Session::get('error') !!} -
- @elseif(isset($errorMsg)) -
- -

{{__('誤差')}}:

- {!! $errorMsg !!} -
- @endif + {{-- ▼ 一覧(編集+チェックを統合列に変更:背景 #faebd7) --}} -
+ @csrf
{{-- ▼ ページネーション(表の上に表示) --}} @@ -66,71 +45,65 @@ 'sort' => $sort ?? '', 'sort_type' => $sort_type ?? '' ])->links('pagination') }} -
+
+ {{-- ▼ フラッシュメッセージ --}} + @if(Session::has('success')) + + @elseif(Session::has('error')) +
+ +

{{__('入力内容に不備があります')}}:

+ {!! Session::get('error') !!} +
+ @elseif(isset($errorMsg)) +
+ +

{{__('入力内容に不備があります')}}:

+ {!! $errorMsg !!} +
+ @endif + + {{-- ▼ 一覧表 --}} - {{-- ★ チェック + 編集 用の1列 --}} - - - - {{-- ▼ ソート対象列 --}} - - {{-- ▼ ソート不可列 --}} - - - + + + + @foreach($list as $item) - - {{-- ▼ 統合セル:チェック + 編集 --}} - - {{-- ▼ データ列 --}} - - - - - + + + + + + + @endforeach
+ - 駐輪分類ID - 駐輪分類名階数ソート順備考駐輪分類ID駐輪分類名階数ソート順備考
-
- - 編集 -
-
{{ $item->ptype_id }}{{ $item->ptype_subject }}{{ $item->floor_sort }}{{ $item->ptype_remarks }}
+ + 編集 + {{ $item->ptype_id }}{{ $item->ptype_subject }} + @if(!is_null($item->floor_sort)) + {{ $item->floor_sort }} 階 + @endif + {{ $item->ptype_remarks }}
-
+ @endsection -@section('scripts') - -@endsection diff --git a/resources/views/admin/stations/_form.blade.php b/resources/views/admin/stations/_form.blade.php index 47010ed..edf3805 100644 --- a/resources/views/admin/stations/_form.blade.php +++ b/resources/views/admin/stations/_form.blade.php @@ -1,153 +1,167 @@ +{{-- アラート --}} @if(Session::has('success')) -@elseif(Session::has('error')) +@endif + +@if($errors->any())
-

{{__('誤差')}}:

- {!! Session::get('error') !!} +

{{ __('入力内容に不備があります:') }}

+
    + @foreach($errors->all() as $error) +
  • {{ $error }}
  • + @endforeach +
@endif +
- {{-- バリデーションエラー表示 --}} - @if ($errors->any()) -
-
    - @foreach ($errors->all() as $error) -
  • {{ $error }}
  • - @endforeach -
+ + {{-- ▼ 近傍駅ID(自動採番:編集時のみ表示) --}} + @if($isEdit) +
+ +
+
+
@endif -
- - -
- -
-
+ {{-- ▼ 駐車場 --}} +
+ +
- +
- - -
- -
-
-
- -
-
- - -
- -
-
-
- -
- @error('station_neighbor_station') -
{{ $message }}
- @enderror -
- - -
- -
-
-
- -
- @error('station_name_ruby') -
{{ $message }}
- @enderror -
- - -
- -
-
-
- -
- @error('station_route_name') -
{{ $message }}
- @enderror -
- - -
- -
-
-
- -
- @error('latitude') -
{{ $message }}
- @enderror -
- - -
- -
-
-
- -
- @error('longitude') -
{{ $message }}
- @enderror -
-
- {{-- ▼ 下部ボタン --}} -
- {{-- 登録ボタン --}} - - {{-- 削除ボタン(編集画面のみ表示) --}} - @if(!empty($station->station_id)) - -
- @csrf - - -
- @endif + {{-- ▼ 近傍駅 --}} +
+ +
+ + +
+
+ + {{-- ▼ 近傍駅ふりがな --}} +
+ +
+ + +
+
+ + {{-- ▼ 路線名 --}} +
+ +
+ + +
+
+ + {{-- ▼ 緯度 --}} +
+ +
+ +
+
+ + {{-- ▼ 経度 --}} +
+ +
+ +
+
+ + + {{-- ▼ 下部ボタン --}} +
+
+ + {{-- 登録ボタン --}} + @if($isEdit) + + @else + + @endif + + {{-- 削除ボタン(編集時のみ表示) --}} + @if($isEdit) + + @endif + +
diff --git a/resources/views/admin/stations/add.blade.php b/resources/views/admin/stations/add.blade.php index 623db07..2d57421 100644 --- a/resources/views/admin/stations/add.blade.php +++ b/resources/views/admin/stations/add.blade.php @@ -1,18 +1,18 @@ @extends('layouts.app') -@section('title', '[東京都|〇〇駐輪場] 近傍駅マスタ') +@section('title', '新規') @section('content')
-

新規登録

+

新規

diff --git a/resources/views/admin/stations/edit.blade.php b/resources/views/admin/stations/edit.blade.php index 67331b4..4c1eb21 100644 --- a/resources/views/admin/stations/edit.blade.php +++ b/resources/views/admin/stations/edit.blade.php @@ -1,5 +1,5 @@ @extends('layouts.app') -@section('title', '[東京都|〇〇駐輪場] 近傍駅マスタ') +@section('title', '編集') @section('content') @@ -24,10 +24,21 @@
-
+ @csrf @include('admin.stations._form', ['isEdit' => true])
+ + {{-- Delete Form --}} +
diff --git a/resources/views/admin/stations/info.blade.php b/resources/views/admin/stations/info.blade.php deleted file mode 100644 index 7197f5b..0000000 --- a/resources/views/admin/stations/info.blade.php +++ /dev/null @@ -1,24 +0,0 @@ -@extends('layouts.admin') - -@section('content') -

近傍駅 詳細

- -
- -

{{ $station->station_neighbor_station }}

- - -

{{ $station->station_name_ruby }}

- - -

{{ $station->station_route_name }}

- - -

{{ $station->park_id }}

- - -

{{ $station->operator_id }}

-
- -戻る -@endsection diff --git a/resources/views/admin/stations/list.blade.php b/resources/views/admin/stations/list.blade.php index 77c0fe6..76aadb3 100644 --- a/resources/views/admin/stations/list.blade.php +++ b/resources/views/admin/stations/list.blade.php @@ -1,5 +1,5 @@ @extends('layouts.app') -@section('title', '[東京都|〇〇駐輪場] 近傍駅マスタ') +@section('title', '近傍駅マスタ') @section('content') @@ -12,7 +12,6 @@
@@ -35,9 +34,7 @@
{{-- 削除 --}} - +
@@ -53,6 +50,7 @@ {{-- ▼ テーブル --}}
+ {{-- ▼ フラッシュメッセージ --}} @if(Session::has('success')) @@ -102,7 +106,8 @@ {{ $station->station_id }} - {{ $station->park_id }} + + {{ $station->park->park_name ?? '' }} {{ $station->station_neighbor_station }} {{ $station->station_name_ruby }} {{ $station->station_route_name }}