Hello,
You can first refer how to Create controller through cmd promt in Laravel.
Then after controller is created you can add simple function to that controller as shown below:
Then go to resource and the web.php and simply add route to that page as follow:
Here {id} will access the passed parameter in url of browser and then it passed this parameter to controller and controller will print the data