2022-03-31 16:45:38 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
2022-10-24 01:01:10 +01:00
|
|
|
class SetNewPasswordRequest extends FormRequest
|
2022-03-31 16:45:38 +01:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function authorize()
|
|
|
|
{
|
2022-10-24 01:01:10 +01:00
|
|
|
if (\Auth::user()->hasDiscordConnection()) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
2022-03-31 16:45:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules()
|
|
|
|
{
|
|
|
|
return [
|
2022-10-24 01:01:10 +01:00
|
|
|
'newpass' => 'required|string|min:10|confirmed',
|
2022-03-31 16:45:38 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|