1 year ago

Single route - multiple actions

Posted 1 year ago by Danieloplata

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', '[email protected]')->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


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 sign in or create an account to participate in this conversation.