src/Repository/StackRepository.php
public function deleteById($id)
    {
        $read = NotificationsStackRead::where([
                    'stack_id' => $id,
                    'user_id'  => user()->id
                ])->first();
        if (!is_null($read)) {
            return $read->delete();
        }
        return false;
    }
public function deleteById($id)
    {
        $read = NotificationsStackRead::where([
                    'stack_id' => $id,
                    'user_id'  => user()->id
                ])->first();
        if (!is_null($read)) {
            return $read->delete();
        }
        return false;
    }
public function deleteById ( $ id ) { $ read = NotificationsStackRead :: where ( [ 'stack_id' => $ id , 'user_id' => user ( ) -> id ] ) -> first ( ) ; if ( ! is_null ( $ read ) ) { return $ read -> delete ( ) ; } return false ; }
Deletes item by id

@param mixed $id
@return boolean
Deletes item by id