mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
source-controls (#193)
* edit source control * assign project after creation * global and project scoped source controls
This commit is contained in:
@ -14,7 +14,7 @@ public function create(User $user, array $input): Project
|
||||
$input['name'] = strtolower($input['name']);
|
||||
}
|
||||
|
||||
$this->validate($user, $input);
|
||||
$this->validate($input);
|
||||
|
||||
$project = new Project([
|
||||
'name' => $input['name'],
|
||||
@ -22,10 +22,12 @@ public function create(User $user, array $input): Project
|
||||
|
||||
$project->save();
|
||||
|
||||
$project->users()->attach($user);
|
||||
|
||||
return $project;
|
||||
}
|
||||
|
||||
private function validate(User $user, array $input): void
|
||||
private function validate(array $input): void
|
||||
{
|
||||
Validator::make($input, [
|
||||
'name' => [
|
||||
|
Reference in New Issue
Block a user