params = $params; } public function handle() { if (!empty($this->params)) { foreach ($this->params as $item) { $result = $this->getRepo()->createOneFromMediaCenter($item); } } } /** * 获取仓库. * @return VideoRepository|mixed */ private function getRepo() { if (!$this->repo instanceof VideoRepository) { $this->repo = make(VideoRepository::class); } return $this->repo; } }