public function delete(Model $model, $user = null)
    {
        if (! $this->isEnabled()) {
            return false;
        }

        $activity = $this->initActivity();

        // Auto determine user if none is supplied
        $user = $this->getUserId($user);

        $data = [
            'user_id'      => $user,
            'subject_id'   => $model->getKey(),
            'subject_type' => get_class($model)
        ];

        $activity->where($data)->delete();
    }
public function delete(Model $model, $user = null)
    {
        if (! $this->isEnabled()) {
            return false;
        }

        $activity = $this->initActivity();

        // Auto determine user if none is supplied
        $user = $this->getUserId($user);

        $data = [
            'user_id'      => $user,
            'subject_id'   => $model->getKey(),
            'subject_type' => get_class($model)
        ];

        $activity->where($data)->delete();
    }
public function delete ( Model $ model , $ user = null ) { if ( ! $ this -> isEnabled ( ) ) { return false ; } $ activity = $ this -> initActivity ( ) ; // Auto determine user if none is supplied $ user = $ this -> getUserId ( $ user ) ; $ data = [ 'user_id' => $ user , 'subject_id' => $ model -> getKey ( ) , 'subject_type' => get_class ( $ model ) ] ; $ activity -> where ( $ data ) -> delete ( ) ; }
Deletes an activity

@param Model $model
@param Model|int $user

@return Model
Deletes an activity