Browse Source

add resend api

mahdi
mahdihty 4 years ago
parent
commit
9806588bc1
  1. 12
      app/Http/Controllers/AuthController.php
  2. 2
      routes/api.php

12
app/Http/Controllers/AuthController.php

@ -218,6 +218,18 @@ class AuthController extends Controller
return response()->json(['message' => 'Register successfully you must be login.'], 200);
}
public function resendLink(Request $request)
{
$this->validate($request, [
'email' => 'required|email',
'type' => 'required|string'
]);
$this->sendVerification($request->email, $request->type);
return response()->json(['message' => 'Link resend successfully'], 200);
}
public function createFingerPrint()
{
$attributes = [

2
routes/api.php

@ -32,6 +32,8 @@ $router->group(['prefix' => 'auth'], function () use ($router) {
$router->post('verification', 'AuthController@verification')->name('verification');
$router->post('resend', 'AuthController@resendLink');
$router->get('google/redirect', 'AuthController@redirectToGoogle')->name('google.redirect');
$router->get('google/callback', 'AuthController@handleGoogleCallback')->name('google.callback');

Loading…
Cancel
Save