July 2018
Intermediate to advanced
420 pages
8h 46m
English
For our application, we will use only one controller to contain all our operations of registration and login, which are register, login, and logout.
Later in this book, you will understand why we are using all operations within a single controller instead of creating a controller for each action:
Open your Terminal window and type the following command:
php artisan make:controller API/AuthController
<?php namespace App\Http\Controllers\API; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\User; use Validator; class AuthController extends Controller { /** * Register a new user. ...