質問編集履歴

2

試したこと3を追記

2018/03/17 08:28

投稿

xian
xian

スコア21

test CHANGED
File without changes
test CHANGED
@@ -282,7 +282,13 @@
282
282
 
283
283
  ```
284
284
 
285
-
285
+ ### 試したこと3
286
+
287
+ 別PC(ubuntu)に`試したこと2`の内容を入れたらうまくいきました。
288
+
289
+ Windwosが悪い気がするので、windowsでローカルのエラー解消は諦めます。。
290
+
291
+ 回答してくださったaro10さんありがとうございました。
286
292
 
287
293
 
288
294
 

1

試したことを追加、補足情報にOSの情報を追加。

2018/03/17 08:27

投稿

xian
xian

スコア21

test CHANGED
File without changes
test CHANGED
@@ -40,8 +40,256 @@
40
40
 
41
41
 
42
42
 
43
+ ### 試したこと2
44
+
45
+ デフォルトで存在する`resources\views\welcome.blade.php`に`<link href="{{asset("css/app.css")}}" rel="stylesheet">`を追記しましたが、F12で`GET http://localhost:8000/css/app.css net::ERR_ABORTED`のエラーが出て読み込めていないようです。
46
+
47
+
48
+
49
+ welcome.blade.phpの記載内容
50
+
51
+ ```
52
+
53
+ <!doctype html>
54
+
55
+ <html lang="{{ app()->getLocale() }}">
56
+
57
+ <head>
58
+
59
+ <meta charset="utf-8">
60
+
61
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
62
+
63
+ <meta name="viewport" content="width=device-width, initial-scale=1">
64
+
65
+ <link href="{{asset("css/app.css")}}" rel="stylesheet">
66
+
67
+
68
+
69
+ <title>Laravel</title>
70
+
71
+
72
+
73
+ <!-- Fonts -->
74
+
75
+ <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
76
+
77
+
78
+
79
+ <!-- Styles -->
80
+
81
+ <style>
82
+
83
+ html, body {
84
+
85
+ background-color: #fff;
86
+
87
+ color: #636b6f;
88
+
89
+ font-family: 'Raleway', sans-serif;
90
+
91
+ font-weight: 100;
92
+
93
+ height: 100vh;
94
+
95
+ margin: 0;
96
+
97
+ }
98
+
99
+
100
+
101
+ .full-height {
102
+
103
+ height: 100vh;
104
+
105
+ }
106
+
107
+
108
+
109
+ .flex-center {
110
+
111
+ align-items: center;
112
+
113
+ display: flex;
114
+
115
+ justify-content: center;
116
+
117
+ }
118
+
119
+
120
+
121
+ .position-ref {
122
+
123
+ position: relative;
124
+
125
+ }
126
+
127
+
128
+
129
+ .top-right {
130
+
131
+ position: absolute;
132
+
133
+ right: 10px;
134
+
135
+ top: 18px;
136
+
137
+ }
138
+
139
+
140
+
141
+ .content {
142
+
143
+ text-align: center;
144
+
145
+ }
146
+
147
+
148
+
149
+ .title {
150
+
151
+ font-size: 84px;
152
+
153
+ }
154
+
155
+
156
+
157
+ .links > a {
158
+
159
+ color: #636b6f;
160
+
161
+ padding: 0 25px;
162
+
163
+ font-size: 12px;
164
+
165
+ font-weight: 600;
166
+
167
+ letter-spacing: .1rem;
168
+
169
+ text-decoration: none;
170
+
171
+ text-transform: uppercase;
172
+
173
+ }
174
+
175
+
176
+
177
+ .m-b-md {
178
+
179
+ margin-bottom: 30px;
180
+
181
+ }
182
+
183
+ </style>
184
+
185
+ </head>
186
+
187
+ <body>
188
+
189
+ <div class="flex-center position-ref full-height">
190
+
191
+ @if (Route::has('login'))
192
+
193
+ <div class="top-right links">
194
+
195
+ @auth
196
+
197
+ <a href="{{ url('/home') }}">Home</a>
198
+
199
+ @else
200
+
201
+ <a href="{{ route('login') }}">Login</a>
202
+
203
+ <a href="{{ route('register') }}">Register</a>
204
+
205
+ @endauth
206
+
207
+ </div>
208
+
209
+ @endif
210
+
211
+
212
+
213
+ <div class="content">
214
+
215
+ <div class="title m-b-md">
216
+
217
+ Laravel
218
+
219
+ </div>
220
+
221
+
222
+
223
+ <div class="links">
224
+
225
+ <a href="https://laravel.com/docs">Documentation</a>
226
+
227
+ <a href="https://laracasts.com">Laracasts</a>
228
+
229
+ <a href="https://laravel-news.com">News</a>
230
+
231
+ <a href="https://forge.laravel.com">Forge</a>
232
+
233
+ <a href="https://github.com/laravel/laravel">GitHub</a>
234
+
235
+ </div>
236
+
237
+ </div>
238
+
239
+ </div>
240
+
241
+ </body>
242
+
243
+ </html>
244
+
245
+ ```
246
+
247
+ web.phpの記載内容
248
+
249
+ ```
250
+
251
+ <?php
252
+
253
+
254
+
255
+ /*
256
+
257
+ |--------------------------------------------------------------------------
258
+
259
+ | Web Routes
260
+
261
+ |--------------------------------------------------------------------------
262
+
263
+ |
264
+
265
+ | Here is where you can register web routes for your application. These
266
+
267
+ | routes are loaded by the RouteServiceProvider within a group which
268
+
269
+ | contains the "web" middleware group. Now create something great!
270
+
271
+ |
272
+
273
+ */
274
+
275
+
276
+
277
+ Route::get('/', function () {
278
+
279
+ return view('welcome');
280
+
281
+ });
282
+
283
+ ```
284
+
285
+
286
+
287
+
288
+
43
289
  ### 補足情報(FW/ツールのバージョンなど)
44
290
 
45
291
 
46
292
 
47
293
  Laravel Framework 5.5.28
294
+
295
+ Windows 7 Home Premium