public function destroy($id)
    {
        try {
            return DB::transaction(function () use ($id) {
                $this->unassignAllRoles($id);
                $this->leaveAllTeams($id);

                $userMetaResult = $this->userMeta->where('user_id', $id)->delete();
                $userResult = $this->model->find($id)->delete();

                return ($userMetaResult && $userResult);
            });
        } catch (Exception $e) {
            throw new Exception("We were unable to delete this profile", 1);
        }
    }
public function destroy($id)
    {
        try {
            return DB::transaction(function () use ($id) {
                $this->unassignAllRoles($id);
                $this->leaveAllTeams($id);

                $userMetaResult = $this->userMeta->where('user_id', $id)->delete();
                $userResult = $this->model->find($id)->delete();

                return ($userMetaResult && $userResult);
            });
        } catch (Exception $e) {
            throw new Exception("We were unable to delete this profile", 1);
        }
    }
public function destroy ( $ id ) { try { return DB :: transaction ( function ( ) use ( $ id ) { $ this -> unassignAllRoles ( $ id ) ; $ this -> leaveAllTeams ( $ id ) ; $ userMetaResult = $ this -> userMeta -> where ( 'user_id' , $ id ) -> delete ( ) ; $ userResult = $ this -> model -> find ( $ id ) -> delete ( ) ; return ( $ userMetaResult && $ userResult ) ; } ) ; } catch ( Exception $ e ) { throw new Exception ( "We were unable to delete this profile" , 1 ) ; } }
Destroy the profile

@param  int $id
@return bool
Destroy the profile