Laravel表单提交
来源:互联网 发布:沈佳宜类型知乎 编辑:程序博客网 时间:2024/06/05 14:59
转载自:https://www.cnblogs.com/sweng/p/6545357.html
首先,先做一个简单的表单页面
1
2
3
4
5
6
7
8
9
10
11
12
<
html
>
<
head
>
</
head
>
<
body
>
<
form
action="/submit" method="post">
<
input
type="text" name="a"></
input
>
<
input
type="text" name="b"></
input
>
<
input
type="text" name="c"></
input
>
<
input
type="submit"></
input
>
</
form
>
</
body
>
<
html
>
编辑一条路由
1
Route::post(
'/submit'
,
'FormController@store'
);
创建一个控制器
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
namespace
App\Http\Controllers;
//use Illuminate\Http\Request;
use
App\Http\Requests;
use
Request;
class
FormController
extends
Controller
{
public
function
store(){
//var_dump(Request::all());
$input
=Request::all();
echo
$input
[
'a'
].PHP_EOL;
echo
$input
[
'b'
].PHP_EOL;
echo
$input
[
'c'
].PHP_EOL;
}
}
阅读全文
0 0
- Laravel表单提交
- laravel 表单提交-POST 异常
- laravel中视图模板的表单提交
- laravel提交表单数据重复的问题
- laravel使用form表单提交必备
- laravel中防止表单重复提交的综合解决方案
- laravel 表单
- laravel视图提交表单到控制器的使用需要注意配置事项
- laravel中,提交表单后给出提示例如添加成功,添加失败等等
- laravel中,提交表单后给出提示例如添加成功,添加失败等等
- 表单提交
- 表单提交
- 表单提交
- 表单提交
- 提交表单
- 表单提交
- 表单提交
- 表单提交
- zookeeper重点总结
- 技术分享连载(九十一)
- LinuxMint安装Node
- 3.2安装一个函数定义
- vs2012解决nuget下载太慢的问题
- Laravel表单提交
- pat甲级1005-Spell It Right
- java位移运算
- 集合框架-HashSet对象判重
- 浅谈如何让 Bootstrap 3兼容IE8浏览器
- Service Plugin / Agent(9)
- Hive产生背景及Hive是什么
- Codeforces 155D(分解质因子+预处理)
- linux两种库:动态库和静态库(共享库)说明