Lesson 21/22 · 5:00 min
Hi Polvis,
I recently upgrade a premium member. I mostly wanted API things.
For Versioning API demo videos are built with old version of Laravel.
Now I am using Laravel 8 or 9.
I couldnt see showed methods MapapiRoutes and Change namespace etc. ?
How can i do that in Laravel 9?
Thanks Thananjeyan !
The mapApiRoutes method was my own method, it doesn't come from Laravel. I don't remember that exact course, but currently in Laravel 9 take a look at Laravel RouteServiceProvider and make the changes you need in $this->routes() method: https://github.com/laravel/laravel/blob/9.x/app/Providers/RouteServiceProvider.php
$this->routes()
I suppose both version should have same database, and can't improve without broken
Hi, Povilas, Should mapApiV2Routes() in the example be base_path('routes/api_v2.php') for it to be correct? (At 3:50 in the video)
mapApiV2Routes()
base_path('routes/api_v2.php')
Yes
Hi Polvis,
I recently upgrade a premium member. I mostly wanted API things.
For Versioning API demo videos are built with old version of Laravel.
Now I am using Laravel 8 or 9.
I couldnt see showed methods MapapiRoutes and Change namespace etc. ?
How can i do that in Laravel 9?
Thanks Thananjeyan !
The mapApiRoutes method was my own method, it doesn't come from Laravel. I don't remember that exact course, but currently in Laravel 9 take a look at Laravel RouteServiceProvider and make the changes you need in
$this->routes()
method: https://github.com/laravel/laravel/blob/9.x/app/Providers/RouteServiceProvider.phpI suppose both version should have same database, and can't improve without broken
Hi, Povilas, Should
mapApiV2Routes()
in the example bebase_path('routes/api_v2.php')
for it to be correct? (At 3:50 in the video)Yes