You wouldn't want to use a get route to create something. You'd use a post route.
I'm not clear on why you are passing the respondentid if you are creating the respondent. How do you know the ID if it hasn't been created yet?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, sorry if this is quite a basic/dumb question. So far from the Laravel from Scratch tutorials, I have created routes and models with a single function - like a
Route::get('/projects/create', 'ProjectController@create')->name('createProject');
Which then runs the create function of my ProjectController
My question is: How do I perform multiple actions based on a single route?
For example:
If I created the following route
Route::get('/start/{panelid}/{respondentid}'`
How would I go about both
1 - Creating a Respondent in the respondent table
2 - Looking up the {PanelID} in the database (in this case a URL stored in the database)
3 - Redirecting to that link?
Please or to participate in this conversation.