Courses

Build Laravel API for Car Parking App: Step-By-Step

Now, in the same fashion, let's generate a Controller for the login mechanism:

php artisan make:controller Api/V1/Auth/LoginController

This will be the new route, in the routes/api.php file:

Route::post('auth/login', Auth\LoginController::class);

Again, the route prefix and Controller namespace will come automatically from the other logic we've discussed earlier, for RegisterController.

This lesson is only for Premium Members.
Want to access all lessons of this course?

You also get:

  • 67 courses (1172 lessons, 43 h 18 min total)
  • Premium tutorials
  • Access to repositories
  • Private Discord