mettle / sendportal

Open-source self-hosted email marketing. Manage your own newsletters at a fraction of the cost.
https://sendportal.io
MIT License
1.72k stars 339 forks source link

TypeError Argument 1 passed to Sendportal\Base\Http\Controllers\Campaigns\CampaignsController::show() #257

Closed benstaf closed 1 year ago

benstaf commented 1 year ago

Hi, I would like to extend the app with a new type of campaigns (let's call it "new campaign"), accessed by a new route, called create_new

In the file sendportal-core/src/Http/Controllers/Campaigns/CampaignsController.php,

I added:

public function create_new(): ...

but when I go with the browser to /campaigns/create_new I get the error: TypeError Argument 1 passed to Sendportal\Base\Http\Controllers\Campaigns\CampaignsController::show() must be of the type int, string given

how can I create this new route create_new?

JonoB commented 1 year ago

You have to create a new route in the web.php routes file