I\'m using Laravel (v5).
I need one user and I\'ve already registered that. Now I want to disable registration for new users. Of course, I need the login form to wor
In laravel 5.3 don't have AuthController.
to disable register route you should change in constructor of RegisterController like this:
You can change form:
public function __construct()
{
$this->middleware('guest');
}
to:
use Illuminate\Support\Facades\Redirect;
public function __construct()
{
Redirect::to('/')->send();
}
Note: for use Redirect don't forget to user Redirect;
So user access to https://host_name/register it's redirect to "/".
When we use php artisan make:auth it's added Auth::route();
automatically.
Please Override Route in /routes/web.php.
You can change it's like this:
* you need to comment this line: Auth::routes();
Thanks! I hope it's can solve your problems.