mirror of
https://github.com/anonaddy/anonaddy
synced 2026-04-26 01:25:06 +02:00
Initial commit
This commit is contained in:
37
app/Http/Requests/StoreDomainRequest.php
Normal file
37
app/Http/Requests/StoreDomainRequest.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Rules\ValidDomain;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreDomainRequest 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',
|
||||
'max:50',
|
||||
'unique:domains',
|
||||
new ValidDomain
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user