public function handle(ProductTypeRepository $productTypeRepository, Dispatcher $event)
    {
        $productType = $productTypeRepository->find($this->id);

        // TODO : Check if the product type is in use

        $productTypeRepository->destroy($productType);

        $event->fire(new ProductTypeWasDestroyed($productType));

        return $productType;
    }
public function handle(ProductTypeRepository $productTypeRepository, Dispatcher $event)
    {
        $productType = $productTypeRepository->find($this->id);

        // TODO : Check if the product type is in use

        $productTypeRepository->destroy($productType);

        $event->fire(new ProductTypeWasDestroyed($productType));

        return $productType;
    }
public function handle ( ProductTypeRepository $ productTypeRepository , Dispatcher $ event ) { $ productType = $ productTypeRepository -> find ( $ this -> id ) ; // TODO : Check if the product type is in use $ productTypeRepository -> destroy ( $ productType ) ; $ event -> fire ( new ProductTypeWasDestroyed ( $ productType ) ) ; return $ productType ; }
Handles destruction of the product type.

@param ProductTypeRepository $productTypeRepository
@param Dispatcher $event
@return ProductType
Handles destruction of the product type .