/** * Execute the job. * * @param UserRepository $userRepository */ public function handle(UserRepository $userRepository) { $fallower = $userRepository->findById($this->userId); $userToFallow = $userRepository->findById($this->userIdToFallow); $userRepository->fallow($userToFallow, $fallower); return $fallower; }
/** * Execute the job. * * @param UserRepository $userRepository */ public function handle(UserRepository $userRepository) { $unfallower = $userRepository->findById($this->userId); $userToUnfallow = $userRepository->findById($this->userIdToUnfallow); $userRepository->unfallow($userToUnfallow, $unfallower); }