php - Action not defined unless I put the complete namespace to controller method in Laravel

one text

Solution:

If you want a namespace prefixed to the Controller when generating URLs to "actions" you will need to define this in your RouteServiceProvider:

protected $namespace = 'App\Http\Controllers';

Also if you do not want the prefix assigned to your Controllers for your routes by default you will have to make sure the route groups do not have this $namespace variable used to assign a namespace with the namespace method in that Service Provider.

Reference for namespace prefixing in Laravel 8: Target class controller does not exist - Laravel 8

Source