mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
re-working validation
This commit is contained in:
parent
499a1561b1
commit
66204e91f4
@ -15,6 +15,12 @@ class RegisterRequest extends Request
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
public function __contstruct(Request $request)
|
||||
{
|
||||
$this->request = $request;
|
||||
}
|
||||
|
||||
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
@ -25,9 +31,8 @@ class RegisterRequest extends Request
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules(Request $request)
|
||||
public function rules()
|
||||
{
|
||||
$this->setRequest($request);
|
||||
|
||||
$rules = [
|
||||
'email' => 'required|unique:users',
|
||||
@ -41,7 +46,7 @@ class RegisterRequest extends Request
|
||||
|
||||
public function response(array $errors)
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$request = $this->request;
|
||||
|
||||
Log::info($request->api_secret);
|
||||
Log::info($request->email);
|
||||
@ -69,15 +74,4 @@ class RegisterRequest extends Request
|
||||
|
||||
|
||||
|
||||
public function setRequest($request)
|
||||
{
|
||||
$this->request = $request;
|
||||
}
|
||||
|
||||
public function getRequest()
|
||||
{
|
||||
return $this->request;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user