When creating a new controller within a subdirectory, it appears that usage of the name Public causes an issue. If the namespace and directory are anything else, it works fine.
Create Laravel Project
composer create-project --prefer-dist laravel/laravel laravel
Create a basic controller in a subdirectory
php artisan make:controller Public/ExampleController --resource
Add this to the index() method in the new controller
dd('This will not work');
Create the route in routes/web.php
Route::resource('example', 'Public\ExampleController');
Test it
php artisan route:list
Now, change thePublic directory name toExample and update its namespace in the controller and the route. Test it again and it will work.
Why would the usage of the word _Public_ make a difference?
Most helpful comment
See this stackoverflow answer.