public function import()
    {
        \DB::beginTransaction();

        try {
            $imported = ($this->insertRole()) ?: false;
            $imported = ($this->insertService()) ?: $imported;
            $imported = ($this->insertRoleServiceAccess()) ?: $imported;
            $imported = ($this->insertApp()) ?: $imported;
            $imported = ($this->insertUser()) ?: $imported;
            $imported = ($this->insertUserAppRole()) ?: $imported;
            $imported = ($this->insertOtherResource()) ?: $imported;
            $imported = ($this->insertEventScripts()) ?: $imported;
            $imported = ($this->storeFiles()) ?: $imported;
            $imported = ($this->overwrote) ?: $imported;
        } catch (\Exception $e) {
            \DB::rollBack();
            \Log::error('Failed to import package. Rolling back. ' . $e->getMessage());

            throw $e;
        }

        \DB::commit();

        return $imported;
    }