質問編集履歴

2

レイアウト追記

2020/09/10 06:39

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -32,9 +32,269 @@
32
32
 
33
33
 
34
34
 
35
- ### 発生している問題・エラーメッセージ
36
-
37
- [routes/web.php]
35
+ ### [resources/views/layouts/app.blade.php]
36
+
37
+ <!DOCTYPE html>
38
+
39
+ <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
40
+
41
+ <head>
42
+
43
+ <meta charset="utf-8">
44
+
45
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
46
+
47
+
48
+
49
+ <title>MCU information</title>
50
+
51
+ <!-- Bootstrap , Avant UI and Google Font -->
52
+
53
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:500,600,700">
54
+
55
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
56
+
57
+ <link rel="stylesheet" href="assets/css/avantui.css">
58
+
59
+
60
+
61
+ <!-- Styles -->
62
+
63
+ <style>
64
+
65
+ html, body {
66
+
67
+ background-color: #fff;
68
+
69
+ color: #636b6f;
70
+
71
+ font-family: 'Nunito', sans-serif;
72
+
73
+ font-weight: 200;
74
+
75
+ height: 100vh;
76
+
77
+ margin: 0;
78
+
79
+ }
80
+
81
+
82
+
83
+ body {
84
+
85
+ background-image: url("/css/white.png");
86
+
87
+ }
88
+
89
+
90
+
91
+ .full-height {
92
+
93
+ height: 100vh;
94
+
95
+ }
96
+
97
+
98
+
99
+ .flex-center {
100
+
101
+ align-items: center;
102
+
103
+ display: flex;
104
+
105
+ justify-content: center;
106
+
107
+ }
108
+
109
+
110
+
111
+ .position-ref {
112
+
113
+ position: relative;
114
+
115
+ }
116
+
117
+
118
+
119
+ .top-right {
120
+
121
+ position: absolute;
122
+
123
+ right: 10px;
124
+
125
+ top: 18px;
126
+
127
+ }
128
+
129
+
130
+
131
+ .content {
132
+
133
+ text-align: center;
134
+
135
+ }
136
+
137
+
138
+
139
+ .title {
140
+
141
+ font-size: 84px;
142
+
143
+ }
144
+
145
+
146
+
147
+ .links > a {
148
+
149
+ color: #636b6f;
150
+
151
+ padding: 0 25px;
152
+
153
+ font-size: 13px;
154
+
155
+ font-weight: 600;
156
+
157
+ letter-spacing: .1rem;
158
+
159
+ text-decoration: none;
160
+
161
+ text-transform: uppercase;
162
+
163
+ }
164
+
165
+
166
+
167
+ .m-b-md {
168
+
169
+ margin-bottom: 30px;
170
+
171
+ }
172
+
173
+ </style>
174
+
175
+
176
+
177
+ <!-- BootstrapのCSS読み込み -->
178
+
179
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
180
+
181
+ <!-- jQuery読み込み -->
182
+
183
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
184
+
185
+ <!-- BootstrapのJS読み込み -->
186
+
187
+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
188
+
189
+
190
+
191
+ </head>
192
+
193
+
194
+
195
+ <body style="padding-top: 4.5rem;">
196
+
197
+ <header>
198
+
199
+ <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark p-1">
200
+
201
+ <a class="navbar-brand" href="{{ url('/home') }}">
202
+
203
+ <img alt="ブランド" src="{{ asset('/assets/images/Marvel.png') }}" width="50" height="50">
204
+
205
+ </a>
206
+
207
+ <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-header" aria-controls="navbar-header" aria-expanded="false" aria-label="ナビゲーションの切替">
208
+
209
+ <span class="navbar-toggler-icon"></span>
210
+
211
+ </button>
212
+
213
+ <div class="collapse navbar-collapse" id="navbar-header">
214
+
215
+ <ul class="navbar-nav mr-auto">
216
+
217
+ <form class="form-inline my-2 my-md-0">
218
+
219
+ <input class="form-control mr-sm-2" type="search" placeholder="検索..." aria-label="Search...">
220
+
221
+ <button class="btn btn-outline-success my-2 my-sm-0" type="submit">検索</button>
222
+
223
+ </form>
224
+
225
+ </ul>
226
+
227
+ @if (Route::has('login'))
228
+
229
+ <form class="form-inline my-2 my-md-0">
230
+
231
+ @auth
232
+
233
+ <button type="button" class="btn btn-outline-success" onclick="location.href='{{ url('/home') }}'">Home</button>
234
+
235
+ @else
236
+
237
+ <button type="button" class="btn btn-outline-success" onclick="location.href='{{ route('register') }}'">Register</button>
238
+
239
+ @if (Route::has('register'))
240
+
241
+ <button type="button" class="btn btn-outline-success" onclick="location.href='{{ route('login') }}'">Login</button>
242
+
243
+ @endif
244
+
245
+ @endauth
246
+
247
+ </form>
248
+
249
+ @endif
250
+
251
+ </div>
252
+
253
+ </nav>
254
+
255
+ </header>
256
+
257
+
258
+
259
+ <body>
260
+
261
+ <div class="flex-center position-ref full-height">
262
+
263
+ <div class="content">
264
+
265
+ <body class="text-center">
266
+
267
+ <form class="form-signin">
268
+
269
+ <h1 class="h3 mb-3 font-weight-normal">To all people who love MARVEL.</h1>
270
+
271
+ <input type="button" class="btn btn-lg btn-secondary btn-block" onclick="location.href='{{ route('login') }}'" value="Login">
272
+
273
+ <br>
274
+
275
+ <input type="button" class="btn btn-lg btn-primary btn-block" onclick="location.href='{{ route('register') }}'" value="Register">
276
+
277
+ </form>
278
+
279
+
280
+
281
+ <!-- jQuery first, then Bootstrap JS, then Avant UI -->
282
+
283
+ <script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
284
+
285
+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js" integrity="sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o" crossorigin="anonymous"></script>
286
+
287
+ <script src="assets/js/avantui.js"></script>
288
+
289
+ </body>
290
+
291
+ </html>
292
+
293
+
294
+
295
+
296
+
297
+ ### [routes/web.php]
38
298
 
39
299
  <?php
40
300
 

1

[web.php]追記

2020/09/10 06:39

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -29,3 +29,149 @@
29
29
  どうすれば元に戻るのかがわからず困っております。
30
30
 
31
31
  ご教示いただけないでしょうか。
32
+
33
+
34
+
35
+ ### 発生している問題・エラーメッセージ
36
+
37
+ [routes/web.php]
38
+
39
+ <?php
40
+
41
+
42
+
43
+ /*
44
+
45
+ |--------------------------------------------------------------------------
46
+
47
+ | Web Routes
48
+
49
+ |--------------------------------------------------------------------------
50
+
51
+ |
52
+
53
+ | Here is where you can register web routes for your application. These
54
+
55
+ | routes are loaded by the RouteServiceProvider within a group which
56
+
57
+ | contains the "web" middleware group. Now create something great!
58
+
59
+ |
60
+
61
+ */
62
+
63
+ Route::get('/', function () {
64
+
65
+ return view('welcome');
66
+
67
+ });
68
+
69
+
70
+
71
+ Auth::routes();
72
+
73
+
74
+
75
+ Route::get('/home', 'HomeController@index')->name('home');
76
+
77
+
78
+
79
+ // ログイン状態
80
+
81
+ Route::group(['middleware' => 'auth'], function() {
82
+
83
+ // ユーザ関連
84
+
85
+ Route::resource('users', 'UsersController');
86
+
87
+
88
+
89
+ });
90
+
91
+
92
+
93
+ // ログイン状態
94
+
95
+ Route::group(['middleware' => 'auth'], function() {
96
+
97
+
98
+
99
+ // ユーザ関連
100
+
101
+ Route::resource('users', 'UsersController', ['only' => ['index', 'show', 'edit', 'update']]);
102
+
103
+
104
+
105
+ // フォロー/フォロー解除を追加
106
+
107
+ Route::post('users/{user}/follow', 'UsersController@follow')->name('follow');
108
+
109
+ Route::delete('users/{user}/unfollow', 'UsersController@unfollow')->name('unfollow');
110
+
111
+
112
+
113
+ });
114
+
115
+
116
+
117
+ // ログイン状態
118
+
119
+ Route::group(['middleware' => 'auth'], function() {
120
+
121
+
122
+
123
+ // ユーザ関連
124
+
125
+ Route::resource('users', 'UsersController', ['only' => ['index', 'show', 'edit', 'update']]);
126
+
127
+
128
+
129
+ // フォロー/フォロー解除を追加
130
+
131
+ Route::post('users/{user}/follow', 'UsersController@follow')->name('follow');
132
+
133
+ Route::delete('users/{user}/unfollow', 'UsersController@unfollow')->name('unfollow');
134
+
135
+
136
+
137
+ });
138
+
139
+
140
+
141
+ // ログイン状態
142
+
143
+ Route::group(['middleware' => 'auth'], function() {
144
+
145
+
146
+
147
+ // ユーザ関連
148
+
149
+ Route::resource('users', 'UsersController', ['only' => ['index', 'show', 'edit', 'update']]);
150
+
151
+
152
+
153
+ // フォロー/フォロー解除を追加
154
+
155
+ Route::post('users/{user}/follow', 'UsersController@follow')->name('follow');
156
+
157
+ Route::delete('users/{user}/unfollow', 'UsersController@unfollow')->name('unfollow');
158
+
159
+
160
+
161
+ // ツイート関連
162
+
163
+ Route::resource('shares', 'SharesController', ['only' => ['index', 'create', 'store', 'show', 'edit', 'update', 'destroy']]);
164
+
165
+
166
+
167
+ // コメント関連
168
+
169
+ Route::resource('comments', 'CommentsController', ['only' => ['store']]);
170
+
171
+
172
+
173
+ // いいね関連
174
+
175
+ Route::resource('favorites', 'FavoritesController', ['only' => ['store', 'destroy']]);
176
+
177
+ });