Skip to content

Commit

Permalink
Merge pull request alaatv#14 from MohamadSH/master
Browse files Browse the repository at this point in the history
Push to dev
  • Loading branch information
MohamadSH authored Sep 26, 2019
2 parents dd226a9 + 0dd97f0 commit 5d5964f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions app/Http/Requests/SubmitVerificationCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace App\Http\Requests;

//use App\Traits\CharacterCommon;
use App\Traits\CharacterCommon;
use Illuminate\Foundation\Http\FormRequest;

class SubmitVerificationCode extends FormRequest
{
// use CharacterCommon;
use CharacterCommon;

public function authorize()
{
Expand All @@ -23,17 +23,17 @@ public function rules()

public function prepareForValidation()
{
// $this->replaceNumbers();
$this->replaceNumbers();
parent::prepareForValidation();
}

// protected function replaceNumbers()
// {
// $input = $this->request->all();
// if (isset($input["code"])) {
// $input["code"] = preg_replace('/\s+/', '', $input["code"]);
// $input["code"] = $this->convertToEnglish($input["code"]);
// }
// $this->replace($input);
// }
protected function replaceNumbers()
{
$input = $this->request->all();
if (isset($input["code"])) {
$input["code"] = preg_replace('/\s+/', '', $input["code"]);
$input["code"] = $this->convertToEnglish($input["code"]);
}
$this->replace($input);
}
}

0 comments on commit 5d5964f

Please sign in to comment.