Hướng dẫn php password reset - đặt lại mật khẩu php
Đã đăng vào thg 2 14, 2019 2:55 SA 1 phút đọc 1 phút đọc Hôm nay mình sẽ hướng dẫn viết API làm chức năng gửi e-mail khi Reset Password với Laravel Passport Authentication Bước 1: Chỉnh sửa migration Chỉnh sửa file migration
Bước 2: Tạo model Password Reset Mở terminal chạy lệnh Vào file code:
Bước 3: Tạo Notifications Chúng ta tạo ra file Mở terminal chạy lệnh Command trên tạo file 0, thêm đoạn code sau vàocode:
Bước 4: Tạo route API Chúng ta sẽ tạo các route API, vào 1 và thêm đoạn code sau vào code: Bước 5: Thêm thư viện Carbon Chạy lệnh 2Bước 6: Tạo Controller Chạy lệnh 3Command trên tạo ra file 4, và thêm đoạn code sau vàocode:
Thế là mình đã hướng dẫn xong viết API, chạy 5 và bật postman lên test thôi Refer
All rights reserved |