0
這裏是我的ContactController.php:MethodNotAllowedHttpException laravel 4.2錯誤
public function destroy($id){
$contact = Contact::find($id);
$contact->delete();
return Redirect::to('http://localhost:8000/contactsview');
}
這裏是我的rountes.php
Route::delete('/contactsview/destroy/{id}', array('uses'=>'[email protected]'));
這裏是我的index.blade.php:
{{ Form::open(array('url'=>'/contactsview/delete/'.$contact->id, 'method'=>'DELETE', 'style'=>'display:inline;')) }}
<!-- {{ Form::hidden('id', $contact->id) }} -->
{{ Form::submit('Delete') }}
{{ Form::close() }}
我做錯了什麼?