| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | public function handle(RemoveProjectTeamCommand $command) |
||
| 27 | { |
||
| 28 | $team = $command->team; |
||
| 29 | |||
| 30 | event(new ProjectTeamWasRemovedEvent($team)); |
||
| 31 | |||
| 32 | // Remove the team id from all project. |
||
| 33 | $team->projects->map(function ($project) { |
||
| 34 | $project->update(['team_id' => 0]); |
||
| 35 | }); |
||
| 36 | |||
| 37 | $team->delete(); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |