Courses

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

User Area: User Login

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.

The full lesson is only for Premium Members.
Want to access all 10 lessons of this course? (55 min read)

You also get:

  • 73 courses
  • Premium tutorials
  • Access to repositories
  • Private Discord