2014-11-01 50 views
0

獲取NotFoundHttpException這是我的路線我的編輯路線

Route::get(
    'account-executive/{$id}/edit', 
    array(
     'as' => 'vendor-edit', 
     'uses' => '[email protected]' 
    ) 
); 

這是我的方法

public function updateVendor($id) 
{ 
    $vendor = Vendor::findOrFail($id); 

    return View::make('admin.edit-account-executive'); 
} 

我不斷收到NotFoundHttpException。任何想法爲什麼?

+0

你想要訪問什麼網址? – lagbox 2014-11-01 01:57:52

+0

site.com/account-executive/1/edit – user3749350 2014-11-01 02:09:57

+0

在您的獲取路線中使用{id}而不是{$ id}。 – guidsen 2014-11-01 02:39:45

回答

3

您的路線定義不正確。

Route::get('account-executive/{$id}/edit', array('as' => 'vendor-edit','uses' => '[email protected]')); 

您不需要$登錄路徑參數的定義。所以你應該只寫​​。

試試吧。