public function delete($id = null, ActivityListener $listener)
    {
        if (is_null($id) && !is_null($range = Input::get('daterange'))) {
            return $this->deleteByRange($listener, $range);
        }
        if (is_null($id) && !is_null($ids = input('attr'))) {
            return $this->deleteByIds($listener, $ids);
        }

        $model = Logs::withoutGlobalScopes()->whereHas('user', function($query) {
                    $query->whereIn('id', $this->users());
                })->find($id);
        if (is_null($model)) {
            return $listener->deleteFailed();
        }
        $model->delete();
        return $listener->deleteSuccess();
    }
public function delete($id = null, ActivityListener $listener)
    {
        if (is_null($id) && !is_null($range = Input::get('daterange'))) {
            return $this->deleteByRange($listener, $range);
        }
        if (is_null($id) && !is_null($ids = input('attr'))) {
            return $this->deleteByIds($listener, $ids);
        }

        $model = Logs::withoutGlobalScopes()->whereHas('user', function($query) {
                    $query->whereIn('id', $this->users());
                })->find($id);
        if (is_null($model)) {
            return $listener->deleteFailed();
        }
        $model->delete();
        return $listener->deleteSuccess();
    }
public function delete ( $ id = null , ActivityListener $ listener ) { if ( is_null ( $ id ) && ! is_null ( $ range = Input :: get ( 'daterange' ) ) ) { return $ this -> deleteByRange ( $ listener , $ range ) ; } if ( is_null ( $ id ) && ! is_null ( $ ids = input ( 'attr' ) ) ) { return $ this -> deleteByIds ( $ listener , $ ids ) ; } $ model = Logs :: withoutGlobalScopes ( ) -> whereHas ( 'user' , function ( $ query ) { $ query -> whereIn ( 'id' , $ this -> users ( ) ) ; } ) -> find ( $ id ) ; if ( is_null ( $ model ) ) { return $ listener -> deleteFailed ( ) ; } $ model -> delete ( ) ; return $ listener -> deleteSuccess ( ) ; }
On delete log item

@param mixed $id
@param ActivityListener $listener
@return type
On delete log item