mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
2.x
This commit is contained in:
@ -27,15 +27,21 @@ public function create(User $user, array $input): Project
|
||||
return $project;
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
return [
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
'unique:projects,name',
|
||||
'lowercase:projects,name',
|
||||
],
|
||||
])->validate();
|
||||
];
|
||||
}
|
||||
|
||||
private function validate(array $input): void
|
||||
{
|
||||
Validator::make($input, self::rules())->validate();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user