Laravel表单输入未返回

时间:2014-02-04 12:31:36

标签: php input laravel laravel-4 return-value

我遇到表单输入没有返回的问题。我在这里遵循本指南:http://www.youtube.com/watch?v=Aq0EcYEshwM以下是代码:

routes.php文件

Route::get('/', function() { 
    return View::make('test');
});

Route::post('create', array(
    'as' => 'create', //name
    function(){
        //return inputs
        return View::make('create');
    }
));

test.blade.php

<form action="{{URL::route('create')}}" method="post">
    Name <input type="text" name="name" id="" >
    <br>
    Password <input type="password" name="password" id="" >
    <br>
    <button type="submit"> Submit </button>
</form> 

create.blade.php

Inputs
<br>
name = {{Input::get('name')}};
<br>
password = {{Input::get('password')}};

0 个答案:

没有答案