2
Ich habe ein Formular :: Modell Ich habe erstellt, wenn ein Datensatz ausgewählt wird Informationen in einem Formular angezeigt, wenn ich es bearbeiten möchte, erhalte ich einen Fehler. , das sagt:Laravel 5.0 Update Formular funktioniert nicht
exception 'InvalidArgumentException' with message 'Route [test/edit] not defined.' in /www/testsite/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:306
routes.php
Route::any('test/edit','Test\[email protected]');
edit.blade.php
{!! Form::model($display,array('url' => array('test/edit',$display->myID),'method' => 'put')) !!}
{!! Form::label('myID', 'My ID') !!}
{!! Form::text('myID') !!}
{!! Form::label('topic', 'Topic') !!}
{!! Form::text('topic') !!}
<br>
{!! Form::label('describe', 'describe') !!}
{!! Form::text('describe') !!}
<br>
{!! Form::submit('Update') !!}
{!! Form::close() !!}
testController.php
public function edit($id,Request $request)
{
$myID = $request->myID;
$topic = $request->topic;
$descibe = $request->descibe;
$validator = \Validator::make(
array(
'myID' => $myID,
'topic' => $topic,
'descibe' => $descibe
), array(
'myID' => 'required|min:1',
'topic' => 'required|min:2',
'descibe' => 'required|min5'
)
);
$test = Test::find($id);
$test->save();
}
Bitte geben Sie mir Antwort funktioniert oder nicht –