Skip to content

Commit

Permalink
Membuat API Endpoint Forgot Password
Browse files Browse the repository at this point in the history
  • Loading branch information
IDStack authored and IDStack committed Oct 11, 2020
1 parent 2c0ab2b commit 68d1b16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Http/Controllers/Api/Auth/PasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
namespace App\Http\Controllers\Api\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Symfony\Component\HttpFoundation\Response;

class PasswordController extends Controller
{
use SendsPasswordResetEmails;

public function reset(Request $request)
{
$request->validate([
Expand Down
1 change: 1 addition & 0 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

Route::post('/password/reset', 'Api\Auth\PasswordController@reset')
->middleware('auth:sanctum');
Route::post('/password/forgot', 'Api\Auth\PasswordController@sendResetLinkEmail');
});

Route::group(['middleware' => 'auth:sanctum'], function () {
Expand Down

0 comments on commit 68d1b16

Please sign in to comment.