How to Laravel route with Get to a specific method in a class

Routing

Routing to a specific controller method in Laravel is easy but only if you know the newer syntax.

Here it is: 

Route::get('/user', [UserController::class, 'index']);
lang-php

Reference

https://laravel.com/docs/8.x/routing#basic-routing