laravel-admin HTTP/1.0 302 Found Cache-Control: no-cache Date
在laravel-admin grid 中使用重定向出现302标识:
protected function grid()
{
return back();
//或return redirect()
}
原因分析:
在重定向post get为同一个路由时会出现HTTP/1.0 302 Found Cache-Control: no-cache Date:
解决方案:
声明gird的index方法:
public function index(Content $content)
{
//此处重定向就不会引发302问题
if(1){
return back();
}
return $content
->title($this->title())
->description($this->description['index'] ?? trans('admin.list'))
->body($this->grid());
}