I want to execute the index function of a controller before returning the dashboard view, but it seems like Laravel automatically returns any view named ‘dashboard’. Even after changing all the names of the dashboard and the route, it returns an error stating there is no route with that name. I tried renaming everything and treated the dashboard as a separate page, but then it doesn’t recognize the route. I just want to retrieve some data from the database and display it on the dashboard.
Marie mouh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.