0
刪除請求不能,並且出現NotFoundHttpException,爲什麼?Laravel刪除NotFoundHttpException
路線::
Route::delete('hapus_user/{id}',array('as' => 'delete_user', 'user' => '[email protected]'));
控制器:
public function destroy($id)
{
$user3 = User::find($id);
$user3->delete();
return Redirect::to('user');
}
觀點:
<a href="<?php echo url('/user/hapus_user/'.$user->id_user); ?>">Hapus</a>