每次该用户进入时,/
我都想重定向到basePath
我已经设置的位置。
这是我的next.config.js
module.exports = {
basePath: '/docs',
}
Run Code Online (Sandbox Code Playgroud)
所以每次我输入路径时/
我想重定向到/docs
.
这是我尝试过的。
module.exports = {
basePath: '/docs',
async rewrites() {
return [
{
source: '/',
destination: '/docs',
},
];
},
async redirects() {
return [
{
source: '/',
destination: '/docs',
},
];
},
};
Run Code Online (Sandbox Code Playgroud)
问题就在于此rewrites
,并且仅redirects
与此相关basePath
。
例如
async redirects() {
return [
{
source: '/test',
destination: '/hello',
},
];
},
Run Code Online (Sandbox Code Playgroud)
我输入/docs/test
它会重定向到/docs/hello
.
但我/
想去 …
如何将我的html表单更改为laravel集体表单
<select style="width:50%;margin-top: 10px;" name="idw">
<option value="0" disabled="true" selected="true">choose</option>
@foreach($warehouse as $w)
<option value="{{$w->id}}" name="idw" id="idw">{{$w->name}}</option>
@endforeach
</select>
Run Code Online (Sandbox Code Playgroud)
以我的集体形式
{!! Form::select('type',
['Task' => $w->id =>w-> $name ],
null,
['class' => 'form-control chosen-type', 'placeholder' => 'Please Choose']
)!!}
Run Code Online (Sandbox Code Playgroud)
我之前使用过集体形式