From 27532685baffc02a332804aad74924b0bd27e5f1 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 30 Dec 2018 23:19:52 +0900 Subject: [PATCH] =?UTF-8?q?POST=E5=85=88=E3=83=AB=E3=83=BC=E3=83=88?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/SettingController.php | 10 ++++++++++ resources/views/setting/profile.blade.php | 16 +++++++++++++--- routes/web.php | 10 ++++++---- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/SettingController.php b/app/Http/Controllers/SettingController.php index de9a364..3f71323 100644 --- a/app/Http/Controllers/SettingController.php +++ b/app/Http/Controllers/SettingController.php @@ -11,6 +11,16 @@ class SettingController extends Controller return view('setting.profile'); } + public function updateProfile() + { + abort(501); + } + + public function updatePrivacy() + { + abort(501); + } + public function password() { abort(501); diff --git a/resources/views/setting/profile.blade.php b/resources/views/setting/profile.blade.php index 29ea200..66d97e8 100644 --- a/resources/views/setting/profile.blade.php +++ b/resources/views/setting/profile.blade.php @@ -3,7 +3,7 @@ @section('tab-content')

プロフィール


-
+ {{ csrf_field() }}
@@ -25,7 +25,7 @@

プライバシー


- + {{ csrf_field() }}
@@ -40,4 +40,14 @@ -@endsection \ No newline at end of file +@endsection + +@push('script') + +@endpush \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index b3b92f6..9edaa98 100644 --- a/routes/web.php +++ b/routes/web.php @@ -29,6 +29,12 @@ Route::middleware('auth')->group(function () { Route::get('/checkin/{id}/edit', 'EjaculationController@edit')->name('checkin.edit'); Route::put('/checkin/{id}', 'EjaculationController@update')->name('checkin.update'); Route::delete('/checkin/{id}', 'EjaculationController@destroy')->name('checkin.destroy'); + + Route::redirect('/setting', '/setting/profile', 301); + Route::get('/setting/profile', 'SettingController@profile')->name('setting'); + Route::post('/setting/profile', 'SettingController@updateProfile')->name('setting.profile.update'); + Route::post('/setting/privacy', 'SettingController@updatePrivacy')->name('setting.privacy.update'); + Route::get('/setting/password', 'SettingController@password')->name('setting.password'); }); Route::get('/info', 'InfoController@index')->name('info'); @@ -37,7 +43,3 @@ Route::get('/info/{id}', 'InfoController@show')->where('id', '[0-9]+')->name('in Route::redirect('/search', '/search/checkin', 301); Route::get('/search/checkin', 'SearchController@index')->name('search'); Route::get('/search/related-tag', 'SearchController@relatedTag')->name('search.related-tag'); - -Route::redirect('/setting', '/setting/profile', 301); -Route::get('/setting/profile', 'SettingController@profile')->name('setting'); -Route::get('/setting/password', 'SettingController@password')->name('setting.password');