質問編集履歴
2
追記
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
LaravelのPolicyでリダイレクトができない
|
test
CHANGED
@@ -103,3 +103,75 @@
|
|
103
103
|
return redirect('index');
|
104
104
|
|
105
105
|
などとも書いてみたが、変化ない。
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
dd(redirect()->route('index'))の結果
|
110
|
+
|
111
|
+
```
|
112
|
+
|
113
|
+
Illuminate\Http\RedirectResponse {#997 ▼
|
114
|
+
|
115
|
+
#request: Illuminate\Http\Request {#73 ▶}
|
116
|
+
|
117
|
+
#session: Illuminate\Session\Store {#657 ▶}
|
118
|
+
|
119
|
+
#targetUrl: "http://localhost:8000/index"
|
120
|
+
|
121
|
+
+headers: Symfony\Component\HttpFoundation\ResponseHeaderBag {#1365 ▼
|
122
|
+
|
123
|
+
#computedCacheControl: array:2 [▶]
|
124
|
+
|
125
|
+
#cookies: []
|
126
|
+
|
127
|
+
#headerNames: array:3 [▶]
|
128
|
+
|
129
|
+
#headers: array:3 [▶]
|
130
|
+
|
131
|
+
#cacheControl: []
|
132
|
+
|
133
|
+
}
|
134
|
+
|
135
|
+
#content: """
|
136
|
+
|
137
|
+
<!DOCTYPE html>\n
|
138
|
+
|
139
|
+
<html>\n
|
140
|
+
|
141
|
+
<head>\n
|
142
|
+
|
143
|
+
<meta charset="UTF-8" />\n
|
144
|
+
|
145
|
+
<meta http-equiv="refresh" content="0;url='http://localhost:8000/index'" />\n
|
146
|
+
|
147
|
+
\n
|
148
|
+
|
149
|
+
<title>Redirecting to http://localhost:8000/index</title>\n
|
150
|
+
|
151
|
+
</head>\n
|
152
|
+
|
153
|
+
<body>\n
|
154
|
+
|
155
|
+
Redirecting to <a href="http://localhost:8000/index">http://localhost:8000/index</a>.\n
|
156
|
+
|
157
|
+
</body>\n
|
158
|
+
|
159
|
+
</html>
|
160
|
+
|
161
|
+
"""
|
162
|
+
|
163
|
+
#version: "1.0"
|
164
|
+
|
165
|
+
#statusCode: 302
|
166
|
+
|
167
|
+
#statusText: "Found"
|
168
|
+
|
169
|
+
#charset: null
|
170
|
+
|
171
|
+
+original: null
|
172
|
+
|
173
|
+
+exception: null
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
```
|
1
追記
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
LaravelのPolicyでリダイレクトができない
|
1
|
+
きLaravelのPolicyでリダイレクトができない
|
test
CHANGED
@@ -60,7 +60,7 @@
|
|
60
60
|
|
61
61
|
// ユーザー情報に画面権限が付与されている場合は true
|
62
62
|
|
63
|
-
if () {
|
63
|
+
if (条件) {
|
64
64
|
|
65
65
|
return true;
|
66
66
|
|