验证后,Laravel 4重定向发布网址和数据

时间:2014-11-28 22:37:40

标签: php laravel laravel-4

嗨,我是laravel的新手想要在用户对网站进行身份验证后重定向发布请求和数据。我使用的是Redirect :: that(' /'),但这只是获取请求而不是发布。

在谷歌搜索后,我发现这是最近的解决方案Auth filter redirecting back to original POST request in Laravel

但是在此页面加载时没有发布数据。当我在谷歌浏览器中检查网络时,它显示为GET请求。但在路线中,我将其定义为邮寄请求。

Route.php - 路线

Route::post('/up', 'HomeController@up');

up.blade.php发布数据" html:{"数据":"数据"}"

<?php if(isset($_POST["html"])) 
    echo "'" . utf8_encode($_POST["html"]) . "'";
?>

在Google Chrome网络中

Remote Address:[::1]:8000
Request URL:http://localhost:8000/up
Request Method:GET
Status Code:200 OK

以前(扩展类)我得到方法未找到错误

0 个答案:

没有答案