anonaddy/app/Http/Requests/StoreAliasRequest.php
2019-09-09 14:46:50 +01:00

35 lines
658 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class StoreAliasRequest 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 [
'domain' => [
'required',
'string',
Rule::in(config('anonaddy.all_domains'))
]
];
}
}