PHP code example of waqar / otploginauthentication
1. Go to this page and download the library: Download waqar/otploginauthentication library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
waqar / otploginauthentication example snippets
php artisan ui bootstrap --auth
php artisan auth:otp
php artisan migrate
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => [' * Create a new user instance after a valid registration.
*
* @param array $data
* @return \App\Models\User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'mobile_no' => str_replace(' ', '', $data['mobile_no']),
'password' => Hash::make($data['password']),
]);
}
php artisan serve
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.