79664311

Date: 2025-06-13 03:12:07
Score: 0.5
Natty:
Report link

In the newer versions of laravel, the syntax has changed, and it should be array: first the class and the second element the function, ex:


Route::middleware('auth:sanctum')->post(
    '/logout',
    [LoginController::class, 'logoutApi']
);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Amir Mehrnam