Route::get('/campaign_sent/{campaign}', 'CampaignsController@sentView')
public function sentView(Campaign $campaignData)
those two highlighted should match
public function sentView(Campaign $campaign)
{
return view('emailcampaign.sent_view');
}
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Since Updated PHP to 8 I'm getting this error: Error Unknown named parameter $campaign
And point the error to this line:
public function callAction($method, $parameters)
{
//This line error
return call_user_func_array([$this, $method], $parameters);
}
This is my route:
Route::get('/campaign_sent/{campaing}', 'CampaignsController@sentView')
->where('campaign', '[0-9]+')
->middleware('auth');
And my Controller:
public function sentView(Campaign $campaignData)
{
return view('emailcampaign.sent_view');
}
Everything was working great just before the update.
Route::get('/campaign_sent/{campaign}', 'CampaignsController@sentView')
public function sentView(Campaign $campaignData)
those two highlighted should match
public function sentView(Campaign $campaign)
{
return view('emailcampaign.sent_view');
}
Please or to participate in this conversation.