/**
  * Handle the command.
  *
  * @param PartialRepositoryInterface $partials
  * @param Decorator                  $decorator
  * @return string
  */
 public function handle(PartialRepositoryInterface $partials, Factory $view)
 {
     if (is_numeric($this->partial) && !($partial = $partials->find($this->partial))) {
         return null;
     }
     if (is_string($this->partial) && !($partial = $partials->findBySlug($this->partial))) {
         return null;
     }
     if (is_object($this->partial)) {
         $partial = $this->partial;
     }
     if (!isset($partial)) {
         return null;
     }
     return $view->make('anomaly.module.partials::partial', compact('partial'))->render();
 }
 /**
  * Delete a partial and go back.
  *
  * @param PartialRepositoryInterface $partials
  * @param Authorizer                 $authorizer
  * @param                            $id
  * @return \Illuminate\Http\RedirectResponse
  */
 public function delete(PartialRepositoryInterface $partials, Authorizer $authorizer, $id)
 {
     $authorizer->authorize('anomaly.module.partials::partials.delete');
     $partials->delete($partials->find($id));
     return redirect()->back();
 }