otp.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | OTP Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register admin routes for your application. These
  8. | routes are loaded by the RouteServiceProvider within a group which
  9. | contains the "web" middleware group. Now create something great!
  10. |
  11. */
  12. use App\Http\Controllers\OTPVerificationController;
  13. use App\Http\Controllers\OTPController;
  14. use App\Http\Controllers\SmsController;
  15. use App\Http\Controllers\SmsTemplateController;
  16. //Verofocation phone
  17. Route::controller(OTPVerificationController::class)->group(function () {
  18. Route::get('/verification', 'verification')->name('verification');
  19. Route::post('/verification', 'verify_phone')->name('verification.submit');
  20. Route::get('/verification/phone/code/resend', 'resend_verificcation_code')->name('verification.phone.resend');
  21. //Forgot password phone
  22. Route::get('/password/phone/reset', 'show_reset_password_form')->name('password.phone.form');
  23. Route::post('/password/reset/submit', 'reset_password_with_code')->name('password.update.phone');
  24. });
  25. //Admin
  26. Route::group(['prefix' =>'admin', 'middleware' => ['auth', 'admin']], function(){
  27. Route::controller(OTPController::class)->group(function () {
  28. Route::get('/otp-configuration', 'configure_index')->name('otp.configconfiguration');
  29. Route::get('/otp-credentials-configuration', 'credentials_index')->name('otp_credentials.index');
  30. Route::post('/otp-configuration/update/activation', 'updateActivationSettings')->name('otp_configurations.update.activation');
  31. Route::post('/otp-credentials-update', 'update_credentials')->name('update_credentials');
  32. });
  33. //Messaging
  34. Route::controller(SmsController::class)->group(function () {
  35. Route::get('/sms', 'index')->name('sms.index');
  36. Route::post('/sms-send', 'send')->name('sms.send');
  37. });
  38. Route::resource('sms-templates', SmsTemplateController::class);
  39. });