拉拉维尔5.2重定向显示空白页

问题描述 投票:0回答:1

redirect()方法显示一个空白页。不起作用也不会显示错误,也没有错误日志中的可用信息(Apache日志中的存储都不是在存储中)

视图可以加载,首先需要检查应该显示哪个表格。如果要修改或创建新项目。问题是在修改表格中,尝试恢复DB信息时,如果找不到的项目应重定向到列表。在此重定向中,系统失败了。

$tituloSeccion = 'Modificar Banner'; $accionForm = 'BannerController@modificar'; $banners = App\Banner::where('id', '=', $variable_id)->get(); if(count($banners) > 0) { $banner = $banners[0]; $titulo = $banner->titulo; $descripcion = $banner->descripcion; $link = $banner->link; $imagen = $banner->imagen; $hasta = $banner->hasta; } else { return redirect('/dspanel/3/2'); }
如果我在重定向之前和之后放置“回声”,则在显示重定向之前,并且未显示重定向后的下一个,则在重定向之前和之后的情况下,如果我在重定向之前和之后放置“ Echo”,则SO。没有“ Echo”,只有我收到空白屏幕。没有重定向
    

不使用

ELSE
php laravel http-redirect response
1个回答
0
投票

public function count(){ if(count($banners) > 0){ $banner = $banners[0]; } return redirect('/dspanel/3/2'); }

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.