Initial Spark Install

This commit is contained in:
Deon George
2017-11-03 16:26:07 +11:00
commit b1a5807eb3
766 changed files with 128896 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace Laravel\Spark\Http\Requests\Settings\Security;
use Illuminate\Foundation\Http\FormRequest;
class EnableTwoFactorAuthRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'country_code' => 'required|numeric',
'phone' => 'required|numeric',
];
}
/**
* Get data to be validated from the request.
*
* @return array
*/
protected function validationData()
{
if ($this->phone) {
$this->merge(['phone' => preg_replace('/[^0-9]/', '', $this->phone)]);
}
return $this->all();
}
}