I'm so sorry @tykus, I really want to understand what you mean and it's probably an easy thing too, but frustratingly I still don't understand :-|
This is how i understood / thought it was:
Route::get('/test.index', [TestController::class, 'index'])->name('bananas');
In the Route::get part I have to define the file location, in this case :
resources>views>test>index.blade.php
The nice thing of giving it a name ('bananas' just to change example from test.index) is to avoid having to change all hard coded routes if I would ever change the directory name/location/...
As long as i follow this method, everything works fine (hence why I'm so convinced i understood perfectly).
HOWEVER, my route name / url is example.com/test.index NOT example.com/test
So I looked at a earlier project from laravel from scratch course and I have this :
//Route to articlespage (all articles) - 2 ways string syntax and php syntax
// PHP Syntax
Route::get('/articles', [ArticlesController::class, 'index'])->name('articles.index');
This works and has url example.com/articles
but directory is also resources>views>articles>index.blade.php
So now I'm really confused why it's not working for me in this case :
Route::get('/test', [TestController::class, 'index'])->name('bananas');
shouldn't the routehelper function see class, 'index' and know that it is referring to the index.blade.php file in the test folder?