嘗試幾分鐘後。我有這個在我的routes.php文件文件Laravel 4:ErrorException未定義變量
Route::get('home/bookappointment/{id?}', array('as' => 'bookappointment', 'uses' => '[email protected]'));
而且我控制器上我有以下幾點:
public function getBookAppointment($id)
{
// find all the services that are active for the especific franchise
$activeServices = Service::whereHas('franchise', function($q) {
$q->where('franchise_id', '=', $id);
})->get();
//var_dump($activeServices);die;
return View::make('frontend/bookappointment')
->with('services', $activeServices);
}
而且我不斷收到此錯誤。
我在做什麼錯?
未定義變量通常在未定義變量時運行。 –
但如果我通過我的網址發送這個? home/bookappointment/297 – Monica