我想在嵌套数组中添加新数据
我的文件是:
{
"username": "erkin",
"email": "erkin-07@hotmail.com",
"password": "b",
"playlists": [
{
"_id": 58,
"name": "asdsa",
"date": "09-01-15",
"musics": [
{
"name": "INNA - Cola Song (feat. J Balvin)",
"duration": "3.00"
},
{
"name": "blabla",
"duration": "3.00"
}
]
}
]
}
Run Code Online (Sandbox Code Playgroud)
我想在此播放列表部分添加音乐:
{
"username": "erkin",
"email": "erkin-07@hotmail.com",
"password": "b",
"playlists": [
{
"_id": 58,
"name": "asdsa",
"date": "09-01-15",
"musics": [
{
"name": "INNA - Cola Song (feat. J Balvin)",
"duration": "3.00"
},
{
"name": "blabla",
"duration": "3.00"
},
{ …Run Code Online (Sandbox Code Playgroud) 我的路线在这里
Route::get('sign-up', ['as' => 'signUp', 'uses' => 'UserController@signUpGet']);
Route::post('sign-up', ['as' => 'signUpPost', 'uses' => 'UserController@signUpPost']);
Run Code Online (Sandbox Code Playgroud)
调节器
return redirect('signUp')->withInput();
Run Code Online (Sandbox Code Playgroud)
和观点
<form role="form" method="POST" action="{{route('signUpPost')}}">
<input type="text" class="form-control" name="username" value="{{ old('username') }}">
</form>
Run Code Online (Sandbox Code Playgroud)
{{old()}}函数返回空值.
我
编辑
了
NotFoundHttpException in RouteCollection.php line 145:
Run Code Online (Sandbox Code Playgroud)