Cartalyst\Sentinel\Users\EloquentUser::delete PHP Method

delete() public method

{@inheritDoc}
public delete ( )
    public function delete()
    {
        $isSoftDeleted = array_key_exists('Illuminate\\Database\\Eloquent\\SoftDeletes', class_uses($this));
        if ($this->exists && !$isSoftDeleted) {
            $this->activations()->delete();
            $this->persistences()->delete();
            $this->reminders()->delete();
            $this->roles()->detach();
            $this->throttle()->delete();
        }
        return parent::delete();
    }

Usage Example

コード例 #1
0
ファイル: User.php プロジェクト: majid-n/cometdev
 public function delete()
 {
     if ($this->exists) {
         $this->resume()->delete();
         $this->likes()->delete();
         $this->comments()->delete();
         $this->profileComments()->delete();
         $this->profileRates()->delete();
         $this->rates()->delete();
         $this->xps()->delete();
         $this->edus()->delete();
         $this->skills()->delete();
         $this->langs()->delete();
     }
     parent::delete();
 }