[Vuejs]-Laravel + VueJS + Axios Get Request Not Working

0๐Ÿ‘

โœ…

Thank you for your help. I found my problem. My problem one line in the web.php file.

Old-Web.php

    Route::get('{path}', [App\Http\Controllers\HomeController::class, 'index'])->where('path','.*');

New-Web.php

    Route::get('{path}', [App\Http\Controllers\HomeController::class, 'index'])->where('/path','([A-z\d-\/_.]+)?');

I changed this line and fixed my problem.

0๐Ÿ‘

I had the same problem today, I solved this problem using the new routing system that laravel 8 offers. I put the resource Route like this:

Route::group(
  [
      'middleware' => 'api',
      'namespace'  => 'App\Http\Controllers',
  ],
  function ($router) {
      Route::resource('user', 'API\UserController');
  }
);

Leave a comment