koel/app/Http/Controllers/API/ForgotPasswordController.php

21 lines
547 B
PHP
Raw Normal View History

2024-02-25 19:32:53 +00:00
<?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Http\Requests\API\ForgotPasswordRequest;
use App\Services\AuthenticationService;
use Illuminate\Http\Response;
class ForgotPasswordController extends Controller
{
public function __invoke(ForgotPasswordRequest $request, AuthenticationService $auth)
{
static::disableInDemo();
return $auth->trySendResetPasswordLink($request->email)
? response()->noContent()
: response('', Response::HTTP_NOT_FOUND);
}
}