Test-Laravel-Routes icon indicating copy to clipboard operation
Test-Laravel-Routes copied to clipboard

Task 12 doesn't pass (because of wrong Controller)

Open ToniMoldovan opened this issue 1 year ago • 3 comments

This is for the ones (like I was) that finished all tasks but the final one (12). It took me about 40mins to figure this out.

Solution: watch carefully the app\Http\Controllers folder. There is a special one called Api.

ToniMoldovan avatar May 22 '24 10:05 ToniMoldovan

I'm still not being able to figure it out mate :)

AnsarMahir avatar May 22 '24 15:05 AnsarMahir

@AnsarMahir what @ToniMoldovan has said is correct, when defining the route you need to import the correct TaskController because there is two of them. You need the one inside the App\Http\Controllers\Api\V1 folder.

AymaneOnline avatar Sep 29 '24 06:09 AymaneOnline

and remember : By default, the api.php route file is already prefixed with api, so you don't need to manually add the prefix for "api".

ivanpujianto avatar Feb 25 '25 10:02 ivanpujianto